->where("timestamp < DATE_SUB(NOW(), INTERVAL 1 DAY)");
This is the advantage of using MySQL's timestamp/datetime/date column types - you can use its inbuilt date and time functions. And I'm pretty sure you don't need Zend_Db_Expr
here.
Edit: I'm not completely clear what you're asking, but I think the WHERE clause above does what you want, just the other way around. You could do this instead:
->where("DATE_ADD(timestamp, INTERVAL 1 DAY) < NOW()");
which is the same thing but written a different way. This means "where timestamp + 1 day is less than the current time".
If it helps, try running this query on your database:
SELECT DATE_ADD(timestamp, INTERVAL 1 DAY), NOW() FROM hl
so you can see how the DATE_ADD()
function in MySQL works.