Add a one day to datetime field in mysql table -
i need update , add 1 day dates have in bse data, table carts , ocurred rows choi_id = 1030;
carts - id - name - choi_id; - inserted
i tried for:
update carts set inserted = inserted + 1 choi_id = 1030;
you try this:
update carts set `inserted` = date_add(`inserted` , interval 1 day) `choi_id` = 1030;
the date_add mysql function adds specified time interval date, seconds, minutes, months, years, etc... input datetime field, not integer +1 not working that.
see here doc: date_add
Comments
Post a Comment