1

I have this listing dates generated by a mysql query:

select * from fechas 
where date (fecha)> = '2014-06-03 'and date (fecha) <= '2014-06-13' 
order by fecha asc 


2014-06-03
2014-06-04
2014-06-05
2014-06-07
2014-06-08
2014-06-09
2014-06-10
2014-06-11
2014-06-12
2014-06-13

I would get with a php function date 2014-06-06, is needed. 2014-06-06 date no sign that there is no record in the db, but I'd get it, greetings

PM 77-1
  • 12,933
  • 21
  • 68
  • 111
  • Please re-phrase your last paragraph stating clearly what you are currently getting and what is the desired output. – PM 77-1 Jul 05 '14 at 17:22
  • You need a table with all the dates. You can do a `LEFT JOIN` from that table to your query to get all the missing dates. – Barmar Jul 05 '14 at 17:27
  • See http://stackoverflow.com/questions/510012/get-a-list-of-dates-between-two-dates?rq=1 – Barmar Jul 05 '14 at 17:29

0 Answers0