I have a database which holds a bunch of events. Each event has a start date and an end date, so they should only show on the site when the date chosen falls between those dates.
I thought it made sense to make use of the SQL BETWEEN statement, but it does not work.
When a user chooses a year and month, I assign php vars and run the query.
Here's the query:
SELECT * FROM table WHERE $year BETWEEN YEAR(Start) AND YEAR(End) AND $month BETWEEN MONTH(Start) AND MONTH(End)
Any ideas or suggestions how to do this?