php - SQL compare dates
I am trying to calculate if a date is between a few dates that are in my database.1
I have the date:
I have some entries in my database that have 2 columns, a
start date and a
Now I want to select rows of my database that collide with the example date. All the dates are in timestamps.
So for example I have in my database the next rows:
start date: 11-2-2016 => end date: 12-2-2016 //does not match start date: 28-2-2016 => end date: 30-2-2016 //does match
Does anyone know how to select them from my database?
Do you just want to select the rows where your_date is in between
end_date? A simple
betweenclause would do that.