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

3
  • Please re-phrase your last paragraph stating clearly what you are currently getting and what is the desired output.
    – PM 77-1
    Jul 5, 2014 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 5, 2014 at 17:27
  • See stackoverflow.com/questions/510012/…
    – Barmar
    Jul 5, 2014 at 17:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.