RE: [PHP-DB] PHP, dates, and MySQL data comparisons

2002-10-01 Thread John W. Holmes
> I have a table with a Date field (-mm-dd) and I would like to retrieve > all rows with the date less than one week ago. > > Something like SELECT FROM table WHERE date > one_week_ago_today. SELECT * FROM table WHERE date > NOW() - INTERVAL 7 DAY; ---John Holmes... -- PHP Database

[PHP-DB] PHP, dates, and MySQL data comparisons

2002-10-01 Thread Joseph Szobody
I have a table with a Date field (-mm-dd) and I would like to retrieve all rows with the date less than one week ago. Something like SELECT FROM table WHERE date > one_week_ago_today. This seems like it should be so simple... yet I'm not getting it. Any help is appreciated. Thanks, J