CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #12 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'suryasuk_amari_nw.description.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by. The SQL statement executed was: SELECT `t`.`id` AS `t0_c0`, `t`.`topik_id` AS `t0_c1`, `t`.`image` AS `t0_c2`, `t`.`active` AS `t0_c3`, `t`.`date_input` AS `t0_c4`, `t`.`date_update` AS `t0_c5`, `t`.`insert_by` AS `t0_c6`, `t`.`last_update_by` AS `t0_c7`, `t`.`writer` AS `t0_c8`, `t`.`sort` AS `t0_c9`, `t`.`image2` AS `t0_c10`, `description`.`id` AS `t1_c0`, `description`.`slide_id` AS `t1_c1`, `description`.`language_id` AS `t1_c2`, `description`.`title` AS `t1_c3`, `description`.`content` AS `t1_c4`, `description`.`url` AS `t1_c5` FROM `sl_slide` `t` LEFT OUTER JOIN `sl_slide_description` `description` ON (`description`.`slide_id`=`t`.`id`) WHERE ((description.language_id = :language_id) AND (active = 1)) GROUP BY t.id ORDER BY t.sort ASC

/home/suryasukses/yii/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

#6
+
 /home/suryasukses/public_html/amariupvc.com/protected/views/layouts/column1.php(14): CActiveRecord->findAll(CDbCriteria)
09         $criteria->addCondition('description.language_id = :language_id');
10         $criteria->addCondition('active = 1');
11         $criteria->params[':language_id'] = $this->languageID;
12         $criteria->group = 't.id';
13         $criteria->order = 't.sort ASC';
14         $slide = Slide::model()->with(array('description'))->findAll($criteria);
15         ?>
16         <div id="gallery-1" class="slider-container preserve-3d">
17             <div class="flexslider preserve-3d">
18                 <ul class="slides">
19                     <?php foreach ($slide as $key => $value): ?>
#10
+
 /home/suryasukses/public_html/amariupvc.com/protected/controllers/HomeController.php(82): CController->render("index", array())
77         $this->metaDesc = ($this->setting['home_meta_description'] != '')? $this->setting['home_meta_description'] : $this->metaDesc;
78 
79         $this->layout='//layouts/column1';
80         $this->render('index', array(
81             // 'product'=>$product,
82         ));
83     }
84 
85     public function actionAbout()
86     {
87         $this->layout='//layouts/column2';
#18
+
 /home/suryasukses/public_html/amariupvc.com/index.php(37): CApplication->run()
32 // specify how many levels of call stack should be shown in each log message
33 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
34 error_reporting(E_ALL ^ E_NOTICE);
35 date_default_timezone_set('Asia/Jakarta');
36 require_once($yii);
37 Yii::createWebApplication($config)->run();
38 
39 $end_timeeeee = microtime(TRUE);
40 
41 // echo $end_timeeeee - $start_timeeeee;
42 // echo "<br>";
2021-01-20 07:55:42 Apache Yii Framework/1.1.12