Update modified timestamp in Dreamweaver and MySQL PHP database
Hello experts! I have an update page where I want the current timestamp updated in the database when the user presses the submit button. I have the update page and it's working (thanks to another expert in the Dreamweaver area). I have a hidden field that is set to update field [modified] in the database table.
My question is what do I put in the hidden field (called hiddenmodified) in the Value field? I'm trying now() and timestamp() but it's not working.
On the update record behavior I am telling Dreamweaver that this field is to update to [modified] field in database but I think I'm just not knowing what to put there in the Value field of the hidden field on my form.
In my table structure I have this set to timestamp.
Thank you experts!
>> My question is what do I put in the hidden field (called hiddenmodified) in the Value field? I'm trying
>> now() and timestamp() but it's not working.
Don't put anything in the value field. Instead, you configure the MySQL column to be an auto-updating timestamp field.
How do you touch the MySQL configuration? Command line? phpMyAdmin?
palmtreeinfotech
ASKER
Hi JASON! Wow you're the expert in all the fields that's great! Hmm..Yeah I have phpmyAdmin. I don't know how to set it to auto-update though from there. I'm looking at the table structure and can't see anything regarding auto update in the table.
Jason, thank you so much for screenshots. I took out the default and made the timestamp varilable in the table and now it works! Genius and thanks again!
Open in new window