I am using Codeingiter's active record and need to check for entries that are less than 15 minutes old.
I have tried the following, which I thought would work.
$this->EE->db->select('entry_id')
->from('exp_channel_titles')
->where('status', $status)
->where('channel_id', $channel)
->where(FROM_UNIXTIME('entry_date') >= DATE_SUB(CURDATE(), INTERVAL 15 MINUTE))
->order_by('entry_date', 'desc');
Does anyone know if its possible to do this?
I had hoped this would do work in a where clause"
FROM_UNIXTIME('entry_date') >= DATE_SUB(CURDATE(), INTERVAL 15 MINUTE)
From https://ellislab.com/codeigniter/user-guide/database/active_record.html:
So you should be able to pass a string like: