I have a database table which stores events. The table has a ‘event_date’ column and each event row has a ‘event_date’ column. On querying the table I want only the future events. In SQL query we can do this by adding, ‘event_date >= NOW()’ the where condition.
My question is in Yii, can we write a filter or an action which appends the above criteria, so that I don’t have to mention this criteria in each and every query that is made to the database table?