Re: MySQL query

From: Date: Mon, 12 Jan 2004 20:43:07 +0000
Subject: Re: MySQL query
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-174370@lists.php.net to get a copy of this message
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:ashley@pcraft.com> . 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.

« previous php.general (#174370) next »