select * from table where week(date_field) = ( week(now()) -1 )

Tom Chubb wrote:
How can I query a MySQL table to get the latest results from a date field?
Basically, I am inserting several records at a time at the end of each week.
I want to have a page that displays the results for the last week only.
The date format in the field is YYYY-MM-DD

-- PHP Database Mailing List ( To unsubscribe, visit:

Reply via email to