Re: [PHP-DB] Php datetime

2004-03-04 Thread Hans Lellelid
Daniel Clark wrote: > >>i have created a mysql table where i would like to store the date and time >>whenever a user logs into a web site. the login is done through php/mysql >>as >>well but i'm not sure what the php code is to add the current date/time >>into >>a mysql database. the field in the

Re: [PHP-DB] Php datetime

2004-03-04 Thread Daniel Clark
I've heard you want to use a TIMESTAMP field for that. > i have created a mysql table where i would like to store the date and time > whenever a user logs into a web site. the login is done through php/mysql > as > well but i'm not sure what the php code is to add the current date/time > into > a

RE: [PHP-DB] Php datetime

2004-03-04 Thread Hutchins, Richard
You also have the option of changing the column type to TIMESTAMP. With a TIMESTAMP column you don't have to do anything to get it to update automatically. Just do an INSERT into the table and the column will be updated automatically. Here's a snippet, but check the full MySQL documentation for mo

Re: [PHP-DB] Php datetime

2004-03-04 Thread Ignatius Reilly
You can do it in SQL: INSERT ... SET = NOW() Ignatius _ - Original Message - From: "..: GamCo :.. Gawie Marais" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 04, 2004 14:35 Subject: [PHP-DB] Php datetime > hi, > > i have created a mysql table