RE: [PHP] As x in mysql select

From: Date: Thu, 24 Aug 2000 15:29:40 +0000
Subject: RE: [PHP] As x in mysql select
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13445@lists.php.net to get a copy of this message
In order to access the value once you have executed your query: You can use the mysql_fetch_array function to retrieve the first row obtained from your query like this: $somevalue = mysql_fetch_array($result) // if you are going to retrieve more than one record, you will need a while loop for this then you can access fdate: $fdate = $somevalue["fdate"] ; HTH Sam Masiello System Analyst Chek.Com (716) 853-1362 x289 smasiello@chekinc.com -----Original Message----- From: William S Poarch [mailto:scott@youcanspeak.com] Sent: Thursday, August 24, 2000 11:08 AM To: php-general@lists.php.net Subject: [PHP] As x in mysql select Hope I'm not double posting this, but the first post hasn't shown up. I've got $result = mysql_query("select *,date_format(anniversary_date, '%W %M %Y') as fdate from individual_info where username = '$username'"); How do I use fdate in PHP? Scott Poarch Director, Japan Operations Editj.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#13445) next »