to all guru
how can i query the last seven days of my table
(table )waytogo id (int auto increment) | dates (datetime format) 1 | 2005-11-23 08:54:32 2 | 2005-11-21 09:32:45 3 | 2005-11-12 12:43:22 4 | 2005-11-19 02:30:00
etc...
SELECT * FROM test WHERE CURDATE() - INTERVAL 7 DAY >= `datefield`
Something like that should do it. Works on both DATE, DATETIME fields