skaterdav85 Posted January 11, 2010 Share Posted January 11, 2010 I have a field called 'time' in one of my tables with a type of 'timestamp' and the default is "Current Timestamp". When I do my mysql_query in php to insert data into the table, do I use the php time function or some kind of mysql reserved word? Link to comment Share on other sites More sharing options...
Synook Posted January 11, 2010 Share Posted January 11, 2010 If you want to insert a UNIX timestamp, you would use PHP's time(), however, the MySQL TIMESTAMP data type is the same as DATETIME, and so you would use MySQL's NOW() function if you wanted to insert the current time. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.