CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[07002]: [Microsoft][SQL Server Native Client 11.0]COUNT field incorrect or syntax error. The SQL statement executed was: SELECT [participants].*, [participant_shares].[can_edit]
FROM [participants]
LEFT JOIN [participant_shares] ON participants.participant_id=participant_shares.participant_id
WHERE owner_uid = :userid OR share_uid = :userid

C:\limesurvey\framework\db\CDbCommand.php(528)

516             return $result;
517         }
518         catch(Exception $e)
519         {
520             if($this->_connection->enableProfiling)
521                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
522             $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
523             $message = $e->getMessage();
524             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
525                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
526             if(YII_DEBUG)
527                 $message .= '. The SQL statement executed was: '.$this->getText().$par;
528             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
529                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
530         }
531     }
532 
533     /**
534      * Builds a SQL SELECT statement from the given query specification.
535      * @param array $query the query specification in name-value pairs. The following
536      * query options are supported: {@link select}, {@link distinct}, {@link from},
537      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
538      * {@link limit}, {@link offset} and {@link union}.
539      * @return string the SQL statement
540      * @since 1.1.6

Stack Trace

#1
+
 C:\limesurvey\application\models\Participants.php(189): CDbCommand->queryAll()
184                                ->select('{{participants}}.*,{{participant_shares}}.can_edit')
185                                ->from('{{participants}}')
186                                ->leftJoin('{{participant_shares}}', '{{participants}}.participant_id={{participant_shares}}.participant_id')
187                                ->where('owner_uid = :userid OR share_uid = :userid')
188                                ->bindParam(":userid", $userid, PDO::PARAM_INT)
189                                ->queryAll());
190     }
191 
192     function getParticipantsWithoutLimit()
193     {
194         return Yii::app()->db->createCommand()->select('*')->from('{{participants}}')->queryAll();
#2
+
 C:\limesurvey\application\controllers\admin\participantsaction.php(99): Participants->getParticipantsOwnerCount(3)
094             $iTotalRecords = Participants::model()->count();
095         }
096         // if not only the participants on which he has right on (shared and owned)
097         else
098         {
099             $iTotalRecords = Participants::model()->getParticipantsOwnerCount($iUserID);
100         }
101 
102         // gets the count of participants, their attributes and other such details
103         $aData = array(
104             'totalrecords' => $iTotalRecords,
#5
+
 C:\limesurvey\application\core\Survey_Common_Action.php(82): CAction->runWithParamsInternal(participantsaction, ReflectionMethod, array("sa" => "index"))
77             $oMethod = new ReflectionMethod($this, $sDefault);
78         }
79 
80         // We're all good to go, let's execute it
81         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
82         return parent::runWithParamsInternal($this, $oMethod, $params);
83     }
84 
85     /**
86     * Some functions have different parameters, which are just an alias of the
87     * usual parameters we're getting in the url. This function just populates
2012-11-22 10:25:49 Microsoft-IIS/7.5 Yii Framework/1.1.10