当我暂时没有做任何事情时,我收到此错误,我不确定这是否是会话问题。
错误消息是:
CDbCommand无法执行SQL语句:SQLSTATE [42000]:语法错误或访问冲突:1064 SQL语法中有错误;检查与MySQL服务器版本对应的手册,以便在第1行的'=='1')'附近使用正确的语法。执行的SQL语句是:SELECT * FROM
games_developers_app
t
WHERE(状态LIKE:ycp0)AND(developer_id ==:ycp1)
代码是:
public function actionSortReject(){
$util = new Utility();
$util->detectMobileBrowser();
$util->checkWebSiteLanguageInCookies();
$this->layout = "masterLayout";
$count = '0';
$id = Yii::app()->user->getState('id');
$searchsort = "REJ";
$sort = new CDbCriteria();
$sort->addSearchCondition('status', $searchsort);
$sort->addCondition('developer_id='.$id);
$models = GamesDevelopersApp::model()->findAll($sort,array('developer_id'=>$id));
$this->render('/register/applist',array('models'=>$models,'count'=>$count));
}
似乎一切正常,如果我错过了我的代码中的某些内容请告诉我。谢谢=)