var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
mysql select syntax problems
I am trying to do a mysql select statement against a table with a field of Real_Date of type DATE. This is the statement:
The problem is, the query is only returning from 2006-10-01 forward. I have several dates of 2006-09-30 that are being ignored.
$result = mysql_query("SELECT Real_Date, Hour, Hits FROM STATS_BYHOUR WHERE Real_Date >= DATE_ADD(NOW(), INTERVAL -10 DAY)");
Any help would be appreciated.
Try using CURDATE() rather than NOW(). NOW() produces a Timestamp, rather than just the date.
Content Management Solutions, Design, Managed Servers
Providing the highest quality IT services since 1999.
It turned out to be a different problem entirely. I didn't realize the data stream was being truncated. But, you'll be seeing another question real soon.
(I would have put a smiley face here, but I don't have 5 posts yet)