Re: Date Select
| From: | pete M | Date: | Fri, 25 Jun 2004 11:26:49 +0000 |
| Subject: | Re: Date Select | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-db+get-34956@lists.php.net to get a copy of this message | ||
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