CDbException

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1. The SQL statement executed was: SELECT COUNT(*) FROM `lime_users` `t` WHERE uid=:uid AND parent_id=:parent_id)

/var/www/sondagesen/htmlpublic/framework/db/CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#2
+
 /var/www/sondagesen/htmlpublic/application/controllers/admin/useraction.php(324): CActiveRecord->count("uid=:uid AND parent_id=:parent_id)", array(":uid" => 17, "parent_id" => 16))
319         if (Yii::app()->request->getParam('uid') != '') {
320             $postuserid = (int) Yii::app()->request->getParam("uid");
321             if (
322                 Permission::model()->hasGlobalPermission('superadmin', 'read') // Super admin have all right on user
323                 || Yii::app()->session['loginID'] == $postuserid // User can edit himself
324                 || (Permission::model()->hasGlobalPermission('users', 'update') && User::model()->count("uid=:uid AND parent_id=:parent_id)", array(':uid' => $postuserid, 'parent_id' => Yii::app()->session['loginID']))) // User with users update can only update own Users
325             ) {
326                 $oUser = User::model()->findByPk($postuserid);
327                 $aData = array();
328                 $aData['oUser'] = $oUser;
329 
#5
+
 /var/www/sondagesen/htmlpublic/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(UserAction, ReflectionMethod, array("sa" => "modifyuser"))
78             $oMethod = new ReflectionMethod($this, $sDefault);
79         }
80 
81         // We're all good to go, let's execute it
82         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
83         return parent::runWithParamsInternal($this, $oMethod, $params);
84     }
85 
86     /**
87      * Some functions have different parameters, which are just an alias of the
88      * usual parameters we're getting in the url. This function just populates
#9
+
 /var/www/sondagesen/htmlpublic/application/controllers/AdminController.php(158): CController->run("user")
153                     $this->redirect(array('/admin/authentication/sa/login'));
154                 }
155             }
156         }
157 
158         return parent::run($action);
159     }
160 
161     /**
162      * Routes all the actions to their respective places
163      *
2018-04-26 08:46:09 Apache Yii Framework/1.1.18