Jump to content

*SOLVED* date update


eranwein

Recommended Posts

Example:
[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']UPDATE[/span] table_name SET date_column_name [color=orange]=[/color] DATE_ADD(date_column_name, INTERVAL 1 YEAR) [color=green]WHERE[/color] ...
[!--sql2--][/div][!--sql3--]

Leave out the "WHERE" condition to update all rows in the table.

See:
[a href=\"http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#id3216476\" target=\"_blank\"]http://dev.mysql.com/doc/refman/4.1/en/dat....html#id3216476[/a]

[a href=\"http://dev.mysql.com/doc/refman/4.1/en/update.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/4.1/en/update.html[/a]

Link to comment
https://forums.phpfreaks.com/topic/6610-solved-date-update/#findComment-24039
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.