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

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

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