I am trying to add current date to MySQL table using PHP. I have the following code:
$date = date('Y-m-d');
mysql_query("INSERT INTO book_order VALUES($date)") or die (mysql_error());
MySQL returns this error:
Incorrect date value: '1996' for column 'date_order' at row 1
date_order attribute is type date.
I've tried to echo the $date value and prints out 2013-05-12
Why I can't add the date to the table and what is this strange 1996?