On Friday 13 April 2001 04:36, you wrote:
> It's easy once you get the hang of it.
>
> I use:
>
> // Format of MySQL DATETIME timestamp.
> $time = date("Y-m-d H:i:s");
>
> $time is ready for insertion into MySQL. To get the time out though
> you'll need to use the unix timestamp function in mysql.

Using MySQL's NOW() function is a bit easier :)

> That's a bit tougher to get the hang of :)

SELECT FROM_UNIXTIME(time_field) AS foo FROM mytable;

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

"The number of Unix installations has grown to 10, with more expected."
 -- The Unix Programmer's Manual, 2nd Edition, June 1972

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to