mysql - Add days to a date -


i have table refering past, current , future events, column "start_date" (yyyy-mm-dd) , column "duration" (numeral value).

i want make query ("start_date" + "duration") >= current_date (in order extract data concerning current events)

is possible? how? can guess i'm new mysql

thanks lot

you need use date_add function

where date_add(start_date,interval duration day) >=  curdate() 

Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -