CDbException

خطای CDbCommand در اجرای 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 'تیتر امشب"") AS score
FROM rhc_content
WHERE MATCH(title) AGAINST' at line 1. The SQL statement executed was: SELECT content_id ,title,language_id,cat_id,alias, MATCH(title) AGAINST("نائب رئیس شورای مرکزی سازمان نظام روان شناسی و مشاوره کشور در برنامه "تیتر امشب"") AS score
FROM rhc_content
WHERE MATCH(title) AGAINST("نائب رئیس شورای مرکزی سازمان نظام روان شناسی و مشاوره کشور در برنامه "تیتر امشب"") AND content_id!=2291
ORDER BY score DESC LIMIT 10

/home/moshaverne/domains/moshavernews.ir/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/moshaverne/domains/moshavernews.ir/public_html/protected/modules/content/models/Content.php(386): CDbCommand->queryAll()
381         $sql='SELECT content_id ,title,language_id,cat_id,alias, MATCH(title) AGAINST("'.$model->title.'") AS score
382             FROM {{content}}
383              WHERE MATCH(title) AGAINST("'.$model->title.'") AND content_id!='.$model->content_id.'
384             ORDER BY score DESC LIMIT '.$content_count;
385         $command=Yii::app()->db->createCommand($sql);
386         $result=$command->queryAll();
387             if($result)
388             {
389             return $result;
390             }
391             else 
#2
+
 /home/moshaverne/domains/moshavernews.ir/public_html/protected/modules/block/widgets/BlockContent.php(114): Content->block_related_content(array("content_count" => "10"), "/fa/2291/%D9%86%D8%A7%D8%A6%D8%A8-%D8%B1%D8%A6%DB%8C%D8%B3-%D8%B...")
109                 //die($model_path);
110                 if(is_file((Yii::getPathOfAlias($model_path).$this->extension)))
111                 {    
112                 Yii::import($model_path);
113                 $block_model =new $block_model_name;
114                 $model=$block_model->$model_func($params,$cashe_id);
115                 }
116                 else
117                 {
118                 if(Settings::Options('block_error')=='1')
119                 die('model not found for block_'.$this->block_id);
#4
+
 /home/moshaverne/domains/moshavernews.ir/public_html/themes/Moshavernews/fa/views/layouts/column1.php(21): CBaseController->widget("block.widgets.BlockContent", array("position" => "Column1", "render" => "file"))
16  echo $content;
17  $center_blocks= $this->widget('block.widgets.BlockContent', array(
18          'position'=>'Column1',
19          //'BlockName'=>'mywidget_block',
20          'render'=>'file',//in file {position}.php
21  ));
22  
23  ?>
24 
25         <div class="clear"></div>
26     </section><!--END OF #MainParent-TwoColArea-->
2024-03-29 18:54:15 Apache/2 Yii Framework/1.1.14