I'm having some trouble working out how to do comparisons on a datetime field, in the course of a CakePHP query.
I want for instance to be able to periodically delete all records from my database that relate to an event that occurred in the past. But I haven't gotten much further than:
$this->Item->deleteAll(
'conditions'=>array('date'=> ... ),
false
);
Given that date is stored as a datetime, what's a good way of asking CakePHP to delete all items where the date is earlier than today?