Skip to content

Instantly share code, notes, and snippets.

@mythmon
Created December 4, 2012 21:39
Show Gist options
  • Save mythmon/4209016 to your computer and use it in GitHub Desktop.
Save mythmon/4209016 to your computer and use it in GitHub Desktop.
UPDATE feedback_opinion SET created=date_add(created, interval 6 month) WHERE month(created) < 7 and year(created) = 2012;
@solarce
Copy link

solarce commented Dec 4, 2012

Database changed
mysql> UPDATE feedback_opinion SET created=date_add(created, interval 6 month) WHERE month(created) < 7 and year(created) = 2012;
Query OK, 228132 rows affected (13.76 sec)
Rows matched: 228132 Changed: 228132 Warnings: 0

mysql> select created from feedback_opinion where month(created) < 7 and year(created) = 2012;
Empty set (0.85 sec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment