Simple table:
start_date TIMESTAMP
duration_days INT
In English: I simply want the rows which have not passed their duration period.
In SQL:
SELECT * FROM MyTable WHERE now() < TIMESTAMPADD(DAY, duration_days, start_date);
How can I do this in Kohana/ORM? The duration is different for each of many rows I need to retrieve.
Simply use a
where()clause: