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 MariaDB server version for the right syntax to use near ')) AND (status='0') ORDER BY display_order ASC' at line 1. The SQL statement executed was: SELECT * FROM `cms` `t` WHERE ((type=:ycp2) AND (id!=)) AND (status=:ycp3) ORDER BY display_order ASC

/home/theodyshotel.com/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

#5
+
 /home/theodyshotel.com/public_html/protected/views/blog/detail.php(44): CDataProvider->getData()
39         <div class="row">
40             <div class="col-sm-12 marginb20">
41                 <h2 class="lined-heading"><span><?php echo Yii::t('lang', 'Other blog');?></span></h2>
42             </div>
43             <?php
44             foreach($other->getData() as $dt){
45                 $rdes = json_decode($dt['title'], true);
46                 ?>
47                 <div class="col-lg-4 col-sm-6">
48                     <div class="home-room-box">
49                         <div class="room-image">
#10
+
 /home/theodyshotel.com/public_html/protected/controllers/BlogController.php(20): CController->render("detail", array("data" => null, "lang" => "kr", "other" => CActiveDataProvider))
15 
16     public function actionDetail($blog_slug){
17         $data = Cms::model()->getBySlug($blog_slug);
18             $other = Cms::model()->getListOther($data['id'], 'blog');
19         $lang = Yii::app()->language;
20         $this->render('detail', compact(array('data', 'lang', 'other')));
21     }
22 }
#20
+
 /home/theodyshotel.com/public_html/index.php(24): CApplication->run()
19 // adding PHPExcel autoloader
20 Yii::import('application.vendors.*');
21 require_once dirname(__FILE__).'/protected/extensions/phpexcel/Classes/PHPExcel.php';
22 require_once dirname(__FILE__).'/protected/extensions/phpexcel/Classes/PHPExcel/Autoloader.php';
23 Yii::registerAutoloader(array('PHPExcel_Autoloader','Load'), true);
24 $app->run();
2024-03-19 10:33:22 LiteSpeed Yii Framework/1.1.16