I have tried several topics like this one: How to find missing data rows using SQL? here, but I couldn't make it work in my situation.
I have a table named posts
in MySQL which I save user diaries in it every day. Sometimes users forget to write a post for a day and I want to make it possible for them to submit it later.
So the db structures like this:
date userid
2011-10-01 1
2011-10-02 1
(missing)
2011-10-04 1
2011-10-05 1
(missing)
2011-10-07 1
So I want to show a dropdown list of missing dates in this table of missing rows to user, so he can select the date he wants to submit the post for.
How can I do this? Thanks.