Finding missing consecutive dates in an PHP array

Wednesday, November 12th, 2008

I have dates stored as ‘2008-01-01′ in the period field of a table. It’s the format Y-m=d. I needed a way to query the database and determine if the returned periods were broken consecutively or not. This is what I came up with to solve the problem. The query already returns [...]


Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivs 2.5 License.