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
Post a Comment