article

Friday, March 21, 2014

Select random data from table in yiiframework

Select random data from table in yiiframework



$models=User::model()->findAll(array(
 'select'=>'*, rand() as rand',
 'limit'=>24,
 'order'=>'rand',
 )
);

Related Post