Query and Date problem

From: Date: Wed, 15 Aug 2001 17:18:01 +0000
Subject: Query and Date problem
Groups: php.db 
Request: Send a blank email to php-db+get-11389@lists.php.net to get a copy of this message
I want to retrieve the last 15 days of data from a certain time but not today's. I have this but it's still giving me today's data: $today = date("Y-m-d"); $sql = "SELECT volume, date, time, id FROM $table_name where time = $time1 and date != $today ORDER by id desc LIMIT 15"; (date != $today) code in question When I print $today it's: 2001-08-15 and the date field in the database is also displaying as 2001-08-15. Any suggestions? Thanks in advance. Jeff Oien

« previous php.db (#11389) next »