Random rows from dbase

I have this code


$criteria = new CDbCriteria;

$criteria->condition .= 'category_id = :category_id  AND is_sold = :is_sold AND is_deleted = :is_deleted';

$criteria->params = array(':category_id' => $id, ':is_sold' => 0, ':is_deleted' => 0);

$criteria->order = 't.created DESC, RAND()';

$criteria->limit = 9;

But the RAND() function doesn’t work …

You want to order by created time or by rand? ???