On Friday, April 19, 2002, at 01:23  PM, Richard Fox wrote:

> I want to compare a timestamp(14) field in a MySQL table with the 
> current
> time. Currently I use the following pseudo-sql:
>
> select field from table where table.time <  date("YmdHis", time())
>
> only, the table timestamp is GMT time and the time function is returning
> local time. How do I convert time() to GMT time?

MySQL has a function called NOW() which returns the current time.  Use 
it:

SELECT field
FROM table
WHERE table.time < NOW()




----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to