note 12735 deleted from function.date by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 00:57:33 +0000 |
| Subject: | note 12735 deleted from function.date by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20080@lists.php.net to get a copy of this message | ||
Continuing with paco@velocity.net's note from above dated: 20-Jul-2000 05:50
I found the best way to retreive a date from MySQL so it will work with the DATE() function is the
MySQL function UNIX_TIMESTAMP().
Also note that If your SELECT looks like this:
SELECT UNIX_TIMESTAMP(datefield) FROM table;
the fieldname will return as: "UNIX_TIMESTAMP(datetimefield)" to prevent that use:
SELECT UNIX_TIMESTAMP(datefield) AS datefield FROM table;