Reputation:
I have a table with n records and each record has two field startDate
and day
and i want to select records that if i add day to startDate , result is >= DateTime.Now
can i do it with query?
Upvotes: 1
Views: 113
Reputation: 33935
SELECT * FROM my_table WHERE startdate + INTERVAL day DAY >= NOW();
See juergen d's fiddle: sqlfiddle.com/#!2/eeb77/1
Upvotes: 1