That did it. Anybody know why?
Jeff Oien

> Not sure if this will make a difference, but try putting single quotes
> around $today:
> date != '$today'
> 
> - Jonathan
> 
> 
> -----Original Message-----
> From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 15, 2001 10:18 AM
> To: PHP-DB
> Subject: [PHP-DB] Query and Date problem
> 
> 
> 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
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to