View Single Post
Old 12-09-2012, 05:53 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
I don't quite follow your description but..

PHP Code:
$result queryMysql("SELECT Concat(firstname,' ', lastname), user FROM profiledetails ORDER BY lastname"); 
concatenates (joins) firstname and lastname separated by a space, which becomes the first field returned, which you refer to later as $row[0].
PHP Code:
$result queryMysql("SELECT firstname, lastname, user FROM profiledetails ORDER BY lastname"); 
will keep firstname and lastname separate, referred to as $row[0] and $row[1] in your later code. Then, to perform your comparison, you would use:
PHP Code:
if ($row[0] . ' ' $row[1] == $user) continue; 
which temporarily rejoins first and lastname.

I may not have answered your precise requirement, but I'm sure the answer is in the above description
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote