CDbException

CDbCommand не удалось исполнить SQL-запрос: 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 '334650,334648,334650,334648,334646,334647,334650,334650,334649,334648,334648,334' at line 1. The SQL statement executed was: SELECT * FROM `categories` `t` WHERE id in (334648,,334650,334648,334650,334648,334646,334647,334650,334650,334649,334648,334648,334646,334647,334650,334649,334648,337092,337099,369204,334646,334650,334648,337092,337099,369204,369203,334646,334647,334650,334649,334648,337092,337099,334646,334650,334650,334648,334648,334646,334647,334650,334649,334648,337092,337099,334646,334647,334650,334649,334648,337092,337099,369204,369203,334647,334650,334648,334646,334646,334650,334648,334646,334647,334650,369204)

/var/www/girarozetkiru/data/www/gira-rozetki.ru/framework/db/CDbCommand.php(541)

529         {
530             if($this->_connection->enableProfiling)
531                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
532 
533             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
534             $message=$e->getMessage();
535             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
536                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
537 
538             if(YII_DEBUG)
539                 $message.='. The SQL statement executed was: '.$this->getText().$par;
540 
541             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
542                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
543         }
544     }
545 
546     /**
547      * Builds a SQL SELECT statement from the given query specification.
548      * @param array $query the query specification in name-value pairs. The following
549      * query options are supported: {@link select}, {@link distinct}, {@link from},
550      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
551      * {@link limit}, {@link offset} and {@link union}.
552      * @return string the SQL statement
553      * @since 1.1.6

Stack Trace

#3
+
 /var/www/girarozetkiru/data/www/gira-rozetki.ru/protected/controllers/SeriesController.php(821): CActiveRecord->findAll(array("condition" => "id in (334648,,334650,334648,334650,334648,334646,334647,334650,..."))
816 
817         }
818 
819         if (!empty($colorArr)){
820 
821             $colorCategories = Categories::model()->findAll(array('condition' => sprintf('id in (%s)', join(',', $colorArr))));
822 
823             if (!empty($colorCategories)){
824 
825                 $categoryColorIds = [];
826 
#4
+
 /var/www/girarozetkiru/data/www/gira-rozetki.ru/protected/controllers/SeriesController.php(586): SeriesController->getColorsForFilter(CActiveDataProvider, "5374")
581                 if(false && $emptyData){
582 
583                     throw new CHttpException(404,'Указанная запись не найдена');
584                 }
585 
586                 $colors = $this->getColorsForFilter($allDigitals, $actd->id);
587 
588             }
589 
590             $userinfo = "";
591             if (isset(Yii::app()->request->cookies['yii_cart']->value)) {
#19
+
 /var/www/girarozetkiru/data/www/gira-rozetki.ru/index.php(61): CApplication->run()
56 // remove the following line when in production mode
57 defined('YII_DEBUG') or define('YII_DEBUG',true);
58 
59 ob_start();
60 require_once($yii);
61 Yii::createWebApplication($config)->run();
62 $res = ob_get_clean();
63 if(!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH'] !== 'XMLHttpRequest'){
64 
65     $prepareData = true;
66 
2024-03-19 06:55:30 Apache/2.4.41 (Ubuntu) Yii Framework/1.1.13