Hi,
I think you have two main elements to solve here. The first is establishing how many days in a particular month. Here's how you do it for the current month:
select day(last_day(now()));
You should be able to adapt this to the month you are looking at, by changing the now() element.
As for selecting a row for each day, one way is by using a join to a table that has a column with values that increment by 1 eg 1, 2, 3, 4, 5 and putting in the Where clause "Where col_val <= last_day_value Order by col_val"
Although this is not a complete answer (you'll gain more by working out exactly how to implement the solution) I hope it's of use.
----------------------------------------------------------------------------------
Follow my progress with mysql (English/Spanish) at my blog
http://www.oxfordtechnotes.co.uk/sqlblog/blog4.php