CDbException

CDbCommand a eşuat executarea instrucţiunii SQL: 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 '' at line 1. The SQL statement executed was: SELECT COUNT(*) FROM `item` `t` WHERE county_id = 136 AND published = 1 AND category_id =

/home5/centruinchirieri/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

#10
+
 /home5/centruinchirieri/public_html/themes/bootstrap/views/item/bigviewcountycategory.php(20): CBaseController->widget("zii.widgets.CListView", array("dataProvider" => CActiveDataProvider, "itemView" => "//item/_blogview-smallview", "ajaxUpdate" => true, "template" => "{items}{summary}{pager}", ...))
15     <b><?php echo $category->name ?> </b> reprezinta pagina unde puteti gasi informatii despre <i><?php echo $category->name ?></i>.
16     </p>
17     <?php $this->renderPartial("_formcauta",array('model'=>$model_cauta))?>        
18     <?php
19     $this->widget('zii.widgets.CListView', array(
20         'dataProvider'=>$dataProvider,
21         'itemView'=>'//item/_blogview-smallview',
22         'ajaxUpdate'=>true,
23         'template'=>'{items}{summary}{pager}',        
24 
25         'pager'=>array(
#15
+
 /home5/centruinchirieri/public_html/protected/controllers/ItemController.php(1038): CController->render("bigviewcountycategory", array("model_cauta" => CautaForm, "citys" => array(City, City, City, City, ...), "county" => County, "category" => null, ...))
1033             'model_cauta'=>$model_cauta,
1034             'citys'=>$citys,
1035             'county'=>$county,
1036             'category'=>$category,
1037 
1038             'dataProvider'=>$dataProvider,
1039         ));
1040         }
1041 
1042 
1043 
#30
+
 /home5/centruinchirieri/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-29 05:30:23 LiteSpeed Yii Framework/1.1.13