For hairs you cannot insert a date ("y-m-d h:i:s") into a field of type DateTime,
What kind of timestamp can it be?
$re =mysql_query (' INSERT into ook (XX) VALUES (date ("y-m-d h:i:s"));
Reply to discussion (solution)
$re = mysql_query (' INSERT into ook (XX) VALUES (\ '. Date ("Y-m-d h:i:s"). ' \')');
In single quotation marks, the date function cannot parse the
Get a variable.
$date =date ("y-m-d h:i:s");
and put it in the SQL.
You use Date ("y-m-d h:i:s") just a conversion to the database Date field content format, you do not give it the field name is of course wrong.
$re = mysql_query ("INSERT into ook (XX) VALUES ('). Date ("Y-m-d h:i:s"). "')";
SQL statements are easier to use with "double quotes, because the insertion of a number other than the shape of the shape will have to use the ' single quotation mark
There is the general insertion of the value of the ' single quotation mark is better, too lazy to think whether it should be added single quotation mark problem
I thought the double quotes could parse the variable,
You can also parse the execution of a function: