Help?
| From: | Wee Chua | Date: | Wed, 08 Nov 2000 21:25:20 +0000 |
| Subject: | Help? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24387@lists.php.net to get a copy of this message | ||
Hi all,
Once I have the fullname field from the query, is it possible I could do the
string comparison, thanks a lot.
such as,
$result=mysql_query("SELECT concat(fname,' ',lname) fullname, ... FROM
tablename",$db);
$data=mysql_fetch_row($result);
$data=$row('fullname');
if ($data!==$old)
{ echo "yes";
} else { echo "no"; }
Calvin
-----Original Message-----
From: indrek siitan [mailto:tfr@mysql.com]
Sent: Wednesday, November 08, 2000 2:50 PM
To: Wee Chua; mysql@lists.mysql.com
Subject: RE: Help?
Hi,
> How could I select 2 fields and set it into 1 fields, such as select
> FName, LName and put it into FullName, I tried this but it didn't
> work, what is the syntax in mysql for doing that?
SELECT concat(fname,' ',lname) fullname, ... FROM tablename;
Rgds,
Tfr
--==< tfr@mysql.com >==< MySQL development team >==< Tallinn / Estonia
>==--
--
---------------------------------------------------------------------
Please check "http://www.mysql.com/documentation/manual.php"
before
posting. To request this thread, e-mail mysql-thread55747@lists.mysql.com
To unsubscribe, send a message to:
<mysql-unsubscribe-Chua=mail.interclean.com@lists.mysql.com>
If you have a broken mail client that cannot send a message to
the above address (Microsoft Outlook), you can use:
http://lists.mysql.com/php/unsubscribe.php