Simply I have Two Input box
- Start_date
- End_date
This is my database table
| id | category | start_date | end_date |
| 1 | gold | 2016-05-24 | 2016-05-31 |
| 2 | silver | 2016-05-16 | 2016-05-23 |
Now When I insert date like below:
start_date = 2016-05-25
end_date = 2016-05-27
I want to find out category between imputed date in input box.
I use this select query:
SELECT category
FROM tablename
WHERE '$start_date','$end_date' BETWEEN start_date AND end_date;
But I don't get any result. I know that if you use single date after where I get result but I want to search with two dates