Fix query to get products in widget

I try to show product using firesale widget. No result found but when i check database, it exists and the parameters is correct.
When i check the query its contains .... WHERE  `p`.`price` < 'p.rrp' AND  ... i realized that the rrp considered as string .... so when i change the code to 
$query->where('p.price < p.rrp');

the query correct and now the products appear.