I’m using CActiveDataProvider to provide data for a photo gallery. I want to show photos as random just every time whole page loads but code below repeat randomization every time that I change the page. How can I do it?
$dataProvider = new CActiveDataProvider('Artworks',array(
'criteria'=>array(
'order'=>'RAND() DESC',
),
'pagination'=>array(
'pageSize'=>6,
),
));