[eluser]nelson.wells[/eluser]
This is a query I found from the MySQL documentation, and it works when I don't do active record queries.
Code:
SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;
When I try to do this same query with active record, it doesn't work. It looks like the reason is because the date_col column at the end of the field is being enclosed by single quotes like this:
Code:
SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= 'date_col';
How can I write this in active records without the single quotes being generated?