table name
receipt
id coupondate name recno
1 15-04-2015 A 1
1 15-05-2015 A 1
1 15-06-2015 A 1
1 15-07-2015 A 1
1 15-08-2015 A 1
1 15-09-2015 A 1
here coupondate starts from 15-04-2015 and finished on 15-09-2015..
so i need code which display 1 to all days which comes between 15-04 and 15-09.
expected output
15-04 16-04 17-04 18-04 19-04 20-04 21-04 22-04......like wise 15-09
1 1 1 1 1 1 1 1 1
SELECT RE.coupondate FROM receipt_entry RE LEFT JOIN city_master CM ON RE.city_name = CM.id WHERE CM.cityname = :cityname
AND str_to_date(RE.coupondate,'%d-%m-%Y') BETWEEN :fromdate AND :todate ORDER BY STR_TO_DATE(RE.coupondate,'%d-%m-%Y') ASC