lz19881123 2012-01-05 15:25:33 2949次浏览 0条回复 0 0 0
$sql="select pl_id,pl_content,pl_time,news_title,username from news join pinglun on news_id=pinglun.pl_int  join users on id=pl_person order by pl_id desc";
$data=Yii::app()->db->createCommand($sql)->queryAll();
$dataProvider = new CActiveDataProvider($data);
$this->render('index',array(
    'dataProvider'=>$dataProvider,
));

报错……Fatal error: Call to a member function getDbCriteria() on a non-object in D:\APMServ5.2.6\www\htdocs\yii\framework\web\CActiveDataProvider.php on line 173

    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册