okay, i figured it out
DATE_SUB(CURDATE(),INTERVAL 7 DAY) id 2011-11-12
CURDATE() is 2011-11-19
the value (there was only one unique value) you posted was 1321721536 which equates to 2011-11-19 11:52:16
in other words, it was outside the range, it was greater than 2011-11-19 00:00:00
if you want to include today's rows, you have to do this --
Code:
SELECT *
FROM milpro
WHERE today >= UNIX_TIMESTAMP(CURRENT_DATE - INTERVAL 7 DAY) -- 7 days ago
AND today < UNIX_TIMESTAMP(CURRENT_DATE + INTERVAL 1 DAY) -- less than tonight midnight
please note: the conversion is done on the constant date values, not on the column, so this allows your query to be optimized with an index on the today column