I need to get a recordset between two dates, and am having a little
trouble. I was wondering if someone could me make it more efficient.
Each record has a start_date and end_date field. I want to be able to
extract records that has the start_date and/or end_date, within the
specified date range.
What I have:
select * from table_name where start_date >='2002-10-01' and end_date
This works, but is somewhat inconsistent.
1) the query will exclude a record that has an end_date later then 12/10,
but a start_date later then 10/01. *** I need it to include that***
2) The query also list records with a january 2003 end_date. i.e.
I've read about the mysql BETWEEN and DATE DIFF function, but don't fully get it. I'm
someone can help clarifying it.
Is there a better way to do this? Am I missing something?
=P e p i e D e s i g n s
Providing Solutions That Increase Productivity
Web Developement. Database. Hosting. Multimedia.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php