Select where date = curdate() and 2 days ago?

From: Date: Thu, 01 May 2003 20:30:41 +0000
Subject: Select where date = curdate() and 2 days ago?
Groups: php.db 
Request: Send a blank email to php-db+get-27475@lists.php.net to get a copy of this message
I have a table where one of the columns has a date time field. I am rtying to build a query that will pull all results between the current date and up to 48 hours (2 days) ago. I have tried various queries using examples like below... select * from calls where (event_date_time >= curDate()) select curdate() + 36 select * from calls where SUBDATE(CURDATE(), INTERVAL - 2 DAY) SELECT * from calls where event_date_time = 'curdate()' - INTERVAL 1 SECOND I just can't get the syntax right ( or the concept :-) Please help. Thanks. Lewis

« previous php.db (#27475) next »