Jump to content

Automatic timestamp


Silus

Recommended Posts

I figured it out.

I had to

[b]alter table stats add timestamp timestamp;[/b]

then when I added data from a script I put null into the timestamp field

[b]echo "insert into stats values ( $input4 , $input5 , $input6 , $input13 , $input14 , $input15 , $input16,null );"
[/b]

the $input#'s are just some script variables I added to the table.
Link to comment
https://forums.phpfreaks.com/topic/16515-automatic-timestamp/#findComment-69002
Share on other sites

I see that it broke actually because a scipt was returning data differently than previously(I don't know why this is the case).

Anyways, I swapped to the column list where I list the column names then the data that goes in em

insert into stats (cola,colb) values($input3,$input4);

It made it much easier to see what was exactly causing the error.

Thanks for the help
Link to comment
https://forums.phpfreaks.com/topic/16515-automatic-timestamp/#findComment-69323
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.