What’s wrong about this code?
$criteria = new CDbCriteria();
$criteria->addBetweenCondition('created', new CDbExpression('DATE_SUB(NOW(), INTERVAL 48 HOUR)'), new CDbExpression('NOW()'));
$criteria->limit = 2;
MyModel::model()->findAll($criteria);
It returns just the two top most rows disrespecting the between clause.
Thanks!
I have the same problem!!! help
What is the query generated? You can see it in logs.