Richard Davey wrote:

RD> SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09
RD> 00:00:00' AND '2004-01-04 23:59:59'

Actually sorry, inverse the seconds (put the 00:00:00 onto the lower
date, the 4th) so it encompasses the whole period. You might actually
be able to not even include the seconds, try it and see what happens.


Assume I don't know what those dates are. I need to search based on whatever the current date is, and search between 2 and 7 days back. The dates in my previous post were simply an example.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
 +--------------------------------------------------------------------
 Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith             .     800.441.3873 x130
 Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave. #6
 http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to