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 ': 2.4* Math.PI / 4,<br>
delta: -2.8* Math.PI / 4, ORDER BY cf.name' at line 6. The SQL statement executed was: SELECT `c`.`id` AS `c_id`, `c`.`id_parent` AS `c_id_parent`, `c`.`img_s` AS `c_img_s`, `c`.`img_m` AS `c_img_m`, `cf`.`name` AS `cf_name`, `cf`.`editor_description` AS `cf_editor_description`, `r`.`url` AS `c_url`
FROM `categories` AS `c`
INNER JOIN `categories_fields` AS `cf` ON cf.id_categories = c.id
LEFT JOIN `routes` AS `r` ON r.id = cf.id_routes
WHERE (c.active = 1)
AND (cf.lang = 'es_ES' ) AND (c.id_stores_settings = '1') AND (cf.lang = 'es_ES') AND c.id = alpha: 2.4* Math.PI / 4,<br>
delta: -2.8* Math.PI / 4, ORDER BY cf.name

/home/vhm/library/yii/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

#1
+
 /home/vhm/public_html/protected/models/db/Products_Model_ProductsFOMapper.php(400): CDbCommand->query()
395         }
396         $sql .= $where;
397         $sql .= $order;
398 
399          $command = $this->connection->createCommand($sql);
400          $reader=$command->query();
401         
402          $CatResult = array();
403           foreach($reader as $row){
404             $CatResult [] = $row;
405             
#3
+
 /home/vhm/public_html/protected/models/DataAdapter.php(197): call_user_func_array(array(Products_Model_ProductsFOMapper, "getCategoriesFO"), array(array("lang" => "es_ES", "id_store" => "1", "order" => "cf.name", "id" => "alpha: 2.4* Math.PI / 4,<br> delta: -2.8* Math.PI / 4,")))
192         $function = $request['dataset']['function'];
193         $args = $request['dataset']['vars'];
194         
195         
196         $model = new $mapper();             
197         $result = call_user_func_array(array($model,  $function ), $args);
198          
199         return $result;
200                     
201         }    
202     return false;          
#4
+
 /home/vhm/public_html/protected/models/DataAdapter.php(90): DataAdapter->local_db_Request(array("dataset" => array("mapper" => "Products_Model_ProductsFOMapper", "vars" => array(array("lang" => "es_ES", "id_store" => "1", "order" => "cf.name", "id" => "alpha: 2.4* Math.PI / 4,<br> delta: -2.8* Math.PI / 4,")), "function" => "getCategoriesFO")))
85 
86         if($this->config == 'zendWebservice')
87             return $this->ZendWebGetRequest($query);
88         
89         if($this->config == 'local_db')
90             return $this->local_db_Request($query);
91 
92         return false;            
93     }        
94     
95     
2021-06-05 00:34:47 Apache/2.4.48 (cPanel) OpenSSL/1.1.1k mod_bwlimited/1.4 Yii Framework/1.1.15