I'm trying to show sales transactions for the current month and year in my index view.  

This is what I've put in my sales controller:

```
def index
 @sales = show_sales_for_current_month(@sales)

```

which uses this method in the SalesHelper

```
def show_sales_for_current_month(sales)
  sales = Sale.find(:all,
                  :conditions => ["MONTH(date) = ? AND YEAR(date) =?",
                                  Date.today.month, Date.today.year])
end

```

where date is a date data type.

but i'm getting the following controller error: 

```
SQLite3::SQLException: no such function: MONTH: SELECT "sales".* FROM "sales" WHERE (MONTH(date) = 4 AND YEAR(date) =2011)

```

I've looked around at posts and it seems like that is the correct function, so what am I doing wrong? Thanks!