Hello,
I've got a few tables in MySQL that have ranges of dates (a starting date and an ending date) and in my calendar I want to be able to check the current date against those in the ranges to see if there are events... The only thing is that I can not seem to come up with a good way (or start a good way) to do this. Is there an easy way to see if a date is in a range of other dates?? Thanks for any help.
-thomas
Go through range of dates
Moderator: General Moderators
Something like:
should do it, where $today_date comes from the PHP script.
Code: Select all
SELECT *
FROM table_name
WHERE $today_date BETWEEN start_date AND end_date