MySQL

When building an application that handles events, appointments, or any sort of data with a start and end time, you'll eventually find that you need to do a MySQL query for events that overlap a date range. The two most common uses include: Allow users to filter events by date range Ensuring calendar appointments don't overlap If you've never written a query to do this before, it can be confusing and easily overcomplicated. Thankfully it's actually pretty simple. The Solution I figure some of you will just want the solution, so we'll start there and work backwards. Assume we have…