This question already has an answer here:
I need to update the date and it just don't work, I'm getting sick of this crap! I tryed:
mysqli_query($con, "UPDATE nachrichten SET update = CURDATE() WHERE file = '$msgfile'");
mysqli_query($con, "UPDATE nachrichten SET update = 'CURDATE()' WHERE file = '$msgfile'");
mysqli_query($con, "UPDATE nachrichten SET update = '2014-09-11' WHERE file = '$msgfile'");
mysqli_query($con, "UPDATE nachrichten SET update = 2014-09-11 WHERE file = '$msgfile'");
And much more NON of this s*** is working whats the problem with that? The field type is date and the connection etc works fine I tested other field updates but only the date BS isn't working it's always 0000-00-00
</div>
The field update
keyword and the SQL keyword UPDATE
conflicted here. yes of course you can see the errors from ajax using the firebug
mozilla plugin.
This is works for me to separate update keyword from SQL.
mysqli_query($con, "UPDATE nachrichten SET `update` = 2014-09-11 WHERE file = '$msgfile'");