[thelist] [MySQL] date_add

Hassan Schroeder hassan.schroeder at gmail.com
Wed May 23 20:05:49 CDT 2007


On 5/23/07, Paul Bennett <Paul.Bennett at wcc.govt.nz> wrote:

> Any ideas why this works in MySQL 5.0.18 and not in 3.23.53-log?

3.23.53??  Uh, because you haven't sacrificed a chicken to placate the
restless spirits of the undead? That's WAG #1.  :-)

> "SELECT StartDate + INTERVAL 1 MONTH from petition;"

WAG #2 -- are your sure StartDate is a date or datetime, not a
timestamp?

> Weird thing is that MySQL 3.23 lets me run the query like this:
>
> "SELECT CURRENT_DATE + INTERVAL 1 MONTH as one_month_later;"
> But this fails:
> "SELECT CURRENT_DATE + INTERVAL 1 MONTH as one_month_later from petition;"

yeah, that's wierd, and makes my #2 unlikely. Could it be permissions
on the table? And can you show the CREATE TABLE for 'petition'?

That can wait 'til you get back from the poultry market, though.

-- 
Hassan Schroeder ------------------------ hassan.schroeder at gmail.com



More information about the thelist mailing list