Hello mysql,

I have a PHP script that I have written and it runs beautifully on
current MySQL and PHP sites BUT, it barfs on MySQL 4.0 because I am
using the DATE() to extract the Date from a timestamp. Does anyone
remember how to do an equivalent function in 4.0? I have searched
through hundreds of pages and can not find anything that looks like it
might work. Essentially I need to extract the YYYY-MM-DD from a
timestamp field that I populated in a PHP script so I can do a diff
against a current timestamp.

Here is the query that works on current and falls over dead on 4.0:

"SELECT count(SimulatedTimeSet) as count_live FROM `Simulator`
WHERE DATE( `SimulatedTimeSet` ) = DATE(CURRENT_TIMESTAMP)"

I appreciate in advance any clue to get me in the right directions
other than upgrading the system. I don't have any control over that
one...

TIA
-- 
Best regards,
 mikesz                          mailto:[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to