[thelist] MySQL datestamp in PHP

Jay Blanchard jay.blanchard at niicommunications.com
Wed Jan 14 12:38:13 CST 2004


[snip]
After more than 2 hours of looking, I am ready to admit defeat. I have a

MySQL table with a datestamp field. I cannot find the correct PHP comand
to 
insert the time of record creation.

This does not work. What does?

$result = mysql_query("insert into agent values ( '$dns', '$submit_to', 
'date()')");
[/snip]

$result = mysql_query("insert into agent values ( '$dns', '$submit_to', 
CURRENT_DATE())");

http://www.mysql.com/doc/en/Date_and_time_functions.html


More information about the thelist mailing list