i have a filed exp_d(date data type).
i want to get the records where exp_d > today
in sql this query works fine(select * from tablename where exp_d > now())
i use this code in yii
$criteria = new CDbCriteria;
$now = new CDbExpression("NOW()");
$criteria->compare('exp_d',$now, false, '>');
but i didn't get the desire result.

Help
This topic is locked











