RE: [PHP] mysql select and date functions

From: Date: Wed, 19 Feb 2003 01:10:37 +0000
Subject: RE: [PHP] mysql select and date functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136095@lists.php.net to get a copy of this message
Change your query: select dayofmonth(Posted) as DOM_Posted, month(Posted) as M_Posted, year(Posted)as Y_Posted, hour(Posted) as HH_Posted, minute(Posted) as MM_Posted, Name, Prayer from prayer Then access the access the fields by the name (DOM_Posted). $recSet = mysql_query($query); $row = mysql_fetch_assoc($recSet); Access individual field: $row['DOM_Posted']; $row['M_Posted']; etc.... OR Use the php date (Don't know - haven't tried) functions to parse the required values out of the Posted field. HTH, Bryan

« previous php.general (#136095) next »