CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound. The SQL statement executed was:
SELECT content.*,max(statistics.int_value) int_value FROM cms_main_content content
LEFT JOIN cms_site_statistics statistics ON statistics.source_id = content.main_content_id
WHERE
content.`status`>-1
GROUP BY content.main_content_id
ORDER BY int_value DESC,main_content_id DESC
LIMIT :limit

/var/www/yii/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

#1
+
C
 /var/www/news.wugu.com.cn/protected/controllers/new/zx/2016/NewsBaseController.php(103): CDbCommand->queryAll()
098         if(!empty($conditions['size']))
099         {
100             $pdata->bindvalue ( ':limit', $conditions['size'] );
101         }
102         
103         $result = $pdata->queryAll ();
104         foreach($result as $key=>&$val)
105         {
106             $val['formate_create_time'] = $this->formateDate($val['create_time']);
107             $val['int_value'] = empty($val['int_value'])?rand(300,400):$val['int_value'];//Ķ
108         }
#2
+
C
 /var/www/news.wugu.com.cn/protected/controllers/new/zx/2016/ListController.php(89): NewsBaseController->HotArticles(null)
84         
85         $hotArticles = $this->getApp()->cache->get($key);
86         //$this->getApp()->cache->delete($key);
87         if(empty($hotArticles))
88         {
89             $hotArticles = $this->HotArticles($hotConditions);
90             $this->getApp()->cache->set($key,$hotArticles,2*60);
91         }
92         
93         $pagearr = $this->getpage();//ҳƬ
94         
#10
+
C
 /var/www/news.wugu.com.cn/index-news-product.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();
14 ?>
2018-04-20 16:39:08 Nginx Yii Framework/1.1.13
ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ ڸ翴Ƭ
ӣڸ翴Ƭ  ڸ翴Ƭ  tv  쿴Ƭ    è  ղtv    ڸ翴Ƭ  ǹtv  쿴Ƭ  tv  ڸ翴Ƭ  ڸ翴Ƭ  ڸ翴Ƭ  ǹtv  ۱  èapp  ڸ翴Ƭ  ڸ翴Ƭ