If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > variables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-10-04, 15:26
linuxnewb linuxnewb is offline
Registered User
 
Join Date: May 2004
Posts: 11
Arrow variables


Is it possible to take three seperate variables and combine them into one long variable?

ie. $first = 1
$second = 2
$third = 3
$combine = $first $second $third

$combine now equals: 123.
Reply With Quote
  #2 (permalink)  
Old 07-10-04, 22:44
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
mysql doesn't have variables

should you perhaps be asking this in the php forum?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 07-12-04, 23:41
linuxnewb linuxnewb is offline
Registered User
 
Join Date: May 2004
Posts: 11
You are right

You are right, sorry
Reply With Quote
  #4 (permalink)  
Old 07-13-04, 11:34
Steve T. Steve T. is offline
Registered User
 
Join Date: Sep 2003
Location: So. Cal. USA
Posts: 142
$combine = $first . $second . $third;

string concatenation using dots

(I'm answering here since the Q was not posted in the PHP forums and someone out there may be going, "Doh! But what's the answer?")
Reply With Quote
  #5 (permalink)  
Old 07-13-04, 22:34
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
thanks, steve

i woulda done the same myself but i don't know php, not even enough to know about the dots (although, now that you mention it, i suppose i have seen it around...)
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On