mysql - Update query for time that will save it to the database -



mysql - Update query for time that will save it to the database -

i utilize query:

update `times` set `date` = 2012-04-04 `id` = 1 , `id2` = 2;

it shows update successful, time shows 000-00-00. clue?

when utilize phpmyadmin filed show info want set in. after putting in same information, info changes. how come sql doesn't?

am using wrong info format date?

you need enclose date single quotes.

update times set date = '2012-04-04' id=1 , id2 =2;

your previous statement trying update date numeric value of 2004 (2012 minus 4 minus 4).

mysql

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -