I using curd to show CGridview I join 2 table in my computer it work
but when deploy to linux server not work what wrong? ,help me pls!!
in controller
myController
$model=new UserLogin('search');
$model->unsetAttributes();
$dataProvider = new CActiveDataProvider('UserLogin', array(
'criteria' => array(
'with'=>'group',
),
'pagination' => array(
'pageSize' => 20,
),
));
$this->render('admin', array(
'dataProvider'=>$dataProvider,'model'=>$model)
);
this error
Invalid argument supplied for foreach()
/data/home/nueng/www/html/framework/db/ar/CActiveFinder.php(466)
454
455 /**
456 * Performs lazy find with the specified base record.
457 * @param CActiveRecord $baseRecord the active record whose related object is to be fetched.
458 */
459 public function lazyFind($baseRecord)
460 {
461 if(is_string($this->_table->primaryKey))
462 $this->records[$baseRecord->{$this->_table->primaryKey}]=$baseRecord;
463 else
464 {
465 $pk=array();
466 foreach($this->_table->primaryKey as $name)
467 $pk[$name]=$baseRecord->$name;
468 $this->records[serialize($pk)]=$baseRecord;
469 }
470