I need some help please, for some reason when a new record is added the field called TimeStamp is left blank. Here is how the field is setup:
Column Type Attributes Null Default Extra
TimeStamp timestamp on update CURRENT_TIMESTAMP No CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
Can anyone see anything as to why on a new record its left as 0000-00-00 00:00:00 ?
Below is the PHP code i am using to insert a new record:
$query6 = sprintf("INSERT INTO logs VALUES ('',%s,%s,'')",
The last part thats blank '' is for the TimeStamp as iv left it blank thinking when a new record is added MySQL will add the current time/date automatically, any help would be great!