Re: Search Between Dates
| From: | Chris Lee | Date: | Tue, 16 Oct 2001 17:31:20 +0000 |
| Subject: | Re: Search Between Dates | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71238@lists.php.net to get a copy of this message | ||
"SELECT * FROM table WHERE $s_date >= s_date AND $e_date <= e_date"
wont that work ?
--
Chris Lee
lee@mediawaveonline.com
"Kyle Mathews" <kyle@thedip.net> wrote in message
news:20011016143912.92926.qmail@pb1.pair.com...
> Hello:
>
> I'm looking to create a search function that can take a starting and
ending
> date from a user, and compare that with other start and end dates in a
> database. I would like it to check if any of the days within the users
start
> and end dates fall within any days in the start and end dates within the
> database.
>
> I'm not sure if this can be accomplished on the SQL query, or if it needs
to
> later check for this in an IF statement.
>
> Any help would be appreciated.
>
> Thanks,
> Kyle
> kyle@thedip.net
>
>
>