CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1. The SQL statement executed was: SELECT * FROM `user_claim_data` `t` WHERE user_id = LIMIT 1

/home/myafe/public_html/yii/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

#3
+
 /home/myafe/public_html/protected/modules/myafea/views/myafeav5/chapters/bio.php(13): CActiveRecord->find("user_id = ")
08       <div class="modal-body about_bullet">
09         <p><?php echo $rs->coach['description'];?></p>
10       
11 <?php 
12                       
13 $UserClaimData = UserClaimData::model()->find('user_id = '.$rs->coach['id']);
14 
15  if(is_object($UserClaimData)) {
16 ?>
17   <div class="panel panel-default">
18           <div class="panel-heading">
#7
+
 /home/myafe/public_html/protected/modules/myafea/views/myafeav5/chapters/index.php(213): CController->renderPartial("chapters/bio", array("rs" => null))
208         </div>
209       </div>
210     </div>
211   </div>
212   
213     <?php echo $this->renderPartial('chapters/bio', array('rs' => $rs)); ?>
214 
215 
216   <!--<div class="modal fade" id="bio<?php echo $rs->id;?>" role="dialog">
217     <div class="modal-dialog">
218       <div class="modal-content">
#12
+
 /home/myafe/public_html/protected/modules/myafea/controllers/Myafeav5Controller.php(945): CController->render("chapters/index", array("rs" => null))
940         $rschapter = Chapter::model()->find("slug = '$slug'");
941         }
942         
943         //print_r($rschapter); exit;
944         
945         $this->render('chapters/index', array('rs' => $rschapter));
946     }
947 
948         
949     public function actionchapterboard()
950     { 
2024-03-19 04:33:32 Apache Yii Framework/1.1.14