I have the following code:
$time = 60 * 60 * 24 * 3;
$usersTable = new Application_Model_Db_Users();
$where = 'active = false AND registration_time < ' . time() - $time;
$usersTable->delete($where);
But when it is run it deletes all the rows in the table, where as when I run
DELETE FROM users
WHERE active = false
AND registration_time < 1290500000
Only the ones that match the criteria are deleted. What is the problem?