Re: Searching with Date Ranges
| From: | Marek Kilimajer | Date: | Fri, 12 Sep 2003 07:49:29 +0000 |
| Subject: | Re: Searching with Date Ranges | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162388@lists.php.net to get a copy of this message | ||
John W. Holmes wrote:
Seth Willits wrote:And change the column type to DATE!!!If I want to show events (records in a MySQL table) for the next 10 days (and I do), what would be the best approach to searching with this range? (The dates in my table are stored as a string in the format YYYY/MM/DD.)
SELECT * FROM Table WHERE event_date BETWEEN NOW() AND NOW() + INTERVAL 10 DAY;"Read the book! Be patient! All success comes from acquiring knowledge and experience."You quote yourself in your own signature? Isn't that... illegal or something... ;)-- Seth Willits