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 'ORDER BY 1-- -','458','459','460','461','462','463','464','465','466','467','...' at line 1. The SQL statement executed was: SELECT * FROM `product` `t` WHERE t.category_id IN ('457' ORDER BY 1-- -','458','459','460','461','462','463','464','465','466','467','468','469') AND t.is_active='1' ORDER BY t.created_date DESC, CASE WHEN (t.price is NOT NULL OR t.price>'0.00') THEN 1 ELSE 2 END,`t`.rank DESC, RAND() LIMIT 15

/home2/creole01/nouvoo.fr/domains/prod.nouvoo.fr/public_html/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

#5
+
 /home2/creole01/nouvoo.fr/domains/prod.nouvoo.fr/public_html/protected/models/Product.php(757): CDataProvider->getData()
752         $options['offset']=0;
753         $options['limit']=$limit;
754         // print_r($options);
755     // exit;
756         $dataProvider=Product::getDataProvider($options,$order,$ignore_search);
757         $array=$dataProvider->getData();
758         
759         shuffle($array);
760                 
761         return $array;
762     }
#6
+
 /home2/creole01/nouvoo.fr/domains/prod.nouvoo.fr/public_html/protected/controllers/ListingController.php(1073): Product::getMostRecentItems(array("category_id" => "457"))
1068         );
1069         
1070         $this->topBloc='_pub';
1071         
1072         // Most recent
1073         $items=Product::getMostRecentItems(array('category_id'=>isset($model->category->parent)?$model->category->parent_id:$model->category_id));        
1074         $sidebarBlocs[]=array(
1075             'name' => AP_BLOC_PATH.'_featured_list',
1076             'title' => mt_rand(0,1)?Yii::t('app','Meilleures ventes'):Yii::t('app','Notre sélection'),
1077             'items' => $items,
1078         );
#17
+
 /home2/creole01/nouvoo.fr/domains/prod.nouvoo.fr/public_html/index.php(58): CApplication->run()
53         // header("Location: http://pro.".AP_DOMAIN_NAME."/".$url);
54         // exit;
55     // }
56 
57 require_once($yii);
58 Yii::createWebApplication($config)->run();
2024-03-28 06:16:47 Apache Yii Framework/1.1.14