kernelgpf Posted December 2, 2006 Share Posted December 2, 2006 [code]$aquery=mysql_query("select firstname,lastname,email from advisors where concat(firstname,lastname)='$row[advisor]'")or die(mysql_error());[/code]That is the code I'm using, and I want it to put the columns "firstname" and "lastname" together, which should equal $row[advisor], which is the first and last name of the advisor together. I'm not sure if it needs a space inbetween concat(firstname,"space?",lastname), and if so, I don't know how to put it. Link to comment https://forums.phpfreaks.com/topic/29230-help-with-concat-in-query/ Share on other sites More sharing options...
leeming Posted December 2, 2006 Share Posted December 2, 2006 a quick look up on the mysql documentation...[quote]mysql> SELECT CONCAT('My', 'S', 'QL'); -> 'MySQL'[/quote]so im guessing all u have to do is...[code]...concat(firstname, ' ', lastname)...[/code] Link to comment https://forums.phpfreaks.com/topic/29230-help-with-concat-in-query/#findComment-133992 Share on other sites More sharing options...
kernelgpf Posted December 2, 2006 Author Share Posted December 2, 2006 That worked, thanks! Link to comment https://forums.phpfreaks.com/topic/29230-help-with-concat-in-query/#findComment-133994 Share on other sites More sharing options...
hazratjee Posted December 2, 2006 Share Posted December 2, 2006 i have created a web page using MS front page andihave uploaded a folder named MIDI containing 600 midi filesis there any method that all the names of midi files in folder MIDI automatically appears on my web page i dont want to write names of files in source of html page than create hyper link i have to submit nearly 2000 files i.e. (ring tones ,softwares,themes) i am using services of freewebtown.com may web page will me freewebtown.com/xyz Link to comment https://forums.phpfreaks.com/topic/29230-help-with-concat-in-query/#findComment-134104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.