INTERVAL quirkyness
MySQL date and time commands annoy me almost as much as the MySQL online manual. I’m moving my office so my MySQL reference manual was in some box… and I had to resort to digging through the manual.
I don’t know why I always have a hard time remembering
SELECT DATE_SUB( NOW( ) , INTERVAL 7 DAY );
2006-03-06 17:03:21
SELECT NOW( ) - INTERVAL 7 DAY;
2006-03-06 17:06:54
I’m not sure what confused me… maybe the fact that I was trying to do INTERVAL 1 WEEK



March 13th, 2006 at 6:11 pm
Well, the manual page says that I should be able to do 1 WEEK… of course that is probably in MySQL 5 only… like I said, the manual sucks!
February 24th, 2007 at 3:51 pm
Play this site, really appreciate it.
March 16th, 2008 at 11:12 pm
I like the theme of your blog! Job well done
May 22nd, 2008 at 2:53 pm
I love this site, so thank you