I am trying to select the price between two date (star date and end date). In my database i have fixed price like this:
2013-05-01 to 2013-05-31 price: 300
2013-06-01 to 2013-06-30 price: 200
2013-07-01 to 2013-07-01 price: 250
I user selects any date between these 3 i am able to generate result by doing
sdate>='2013-05-01'
AND edate <='2013-05-31'`.
But if a user selects date 2013-05-28 to 2013-06-03
then it should two days price (300) for may month and 3 days price (200) from the month june.
How can i achieve this?