I currently have a field in a table that needs to be update when I update other values. The field currently has the following settings:
DATE not null default value: 0000-00-00
Here's how I update the values:
$updatedata = mysql_query("update mytable set value1 = '$value1', updated = '$updated_date' where field_id = '$field_id'");
The reason I'm using $updated_date' instead of something like now() because I also post this value in a separate table at the same time.
For some reason all values post OK, except the date. I was even thinking of changing date field from DATE to TEXT but wasn't sure how to keep default value == 0000-00-00 without using hidden input tag when an entry was created
Any ideas? Suggestions?