I have a table with a field:
'last_modified - timestamp NOT NULL'
I have tried
$sql = sprintf("UPDATE %s SET timestamp=now(), %s WHERE id='%s'", $table, $implodeArray, $_POST['id']);
and it still doesnt seem to work. How can I make the timestamp update when I update or insert by table from a script?
Also heres a sample of the scripts output:
UPDATE about SET timestamp=now(), page_header = 'Page header goes here', sub_header = 'Sub header goes here', content_short = 'This is where a short description of the about page goes', content = 'This is where the full content description goes' WHERE id='1'
May be I misread,but your column name is last_modified (typed timestamp), so the query should be:
UPDATE about SET last_modified=now(),
page_header = 'Page header goes here',
sub_header = 'Sub header goes here',
content_short = 'This is where a short description of the about page goes',
content = 'This is where the full content description goes'
WHERE id='1'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With