fill month gaps
===

I need to fill the gap with 0 if no order occurred in a month. 

table example:

    date         product
    2010-02-01   20 
    2010-03-01   10
    2010-03-01   30
    2010-06-01   15

My basic query is:

    SELECT date,SUM(orders.product) AS product
    FROM orders 
    GROUP BY month(date),YEAR(date)

That would return:

    date         product
    2010-02-01   20 
    2010-03-01   40
    2010-06-01   15

but I need:

    date         product
    2010-02-01   20 
    2010-03-01   40
    2010-04-01   0
    2010-05-01   0
    2010-06-01   15

I made a table with all the possible dates:

    datefield
    2010-01-01  
    2010-02-01  
    2010-03-01 
    2010-04-01  
    2010-05-01  
    2010-06-01  
    2010-07-01  
    etc...

But when I try to join the two it doesn't work. 

    SELECT calendar.datefield AS DATE,
    IFNULL(SUM(orders.product),0) AS product
    FROM orders RIGHT JOIN calendar ON (DATE(orders.date) = calendar.datefield)
    WHERE (calendar.datefield BETWEEN (SELECT MIN(DATE(date)) FROM orders) AND (SELECT MAX(DATE(date)) FROM orders))
    GROUP BY DATE 


