I have a table which has following fields
project_name VARCHAR (100)
running_frequency enum ('daily', 'weekly', 'monthly')
last_job_run DATETIME
I want to select those records which are due now based on last_job_run field. For instance, if a task has run yesterday and daily is selected then I need a query to select the record for today, tomorrow and so on.
Is it possible to do it without involving PHP?
Use:
This might run faster as a UNION statement: