What is the minimalist way to return all
records in a table, such as a ‘select * from users’
using active record?
how do you NOT specify a condition?
What is the minimalist way to return all
records in a table, such as a ‘select * from users’
using active record?
how do you NOT specify a condition?
use CActiveRecord::findAll give none parameter .
or you can use findAllBySql
$allArs = MyModel::model()->findAll();
//or
$allArs = MyModel::model()->findAllBySql('select * from <tableName>');