[thelist] [MySQL] date_add

Paul Bennett Paul.Bennett at wcc.govt.nz
Wed May 23 21:30:34 CDT 2007

Hi Jonathan,

(Having you reply to my post makes me feel like I'm one degree of separation away from a "web celebrity")

That's where I started unfortunately, so I checked the manual and tried to strip it down from there to isolate the cause. The diagnosis so far seems to be "MySQL 3 sucks"

The original statement was:

'select id, Title DATE_ADD(StartDate, INTERVAL Duration MONTH) AS EndDate 
FROM petition 
DATE_ADD(StartDate, INTERVAL Duration MONTH) < concat_ws(" ", CURRENT_DATE, CURRENT_TIME);'

You can imagine how *that* went down :)


More information about the thelist mailing list