万博manbetx手机_万博体育manbetx正网_万博manbetx体育客户端

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 'and cid= LIMIT 1' at line 1. The SQL statement executed was: SELECT * FROM `product` `t` WHERE id> and cid= LIMIT 1

/var/www/html/framework/db/CDbCommand.php(516)

504             return $result;
505         }
506         catch(Exception $e)
507         {
508             if($this->_connection->enableProfiling)
509                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
510             $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
511             $message = $e->getMessage();
512             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
513                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
514             if(YII_DEBUG)
515                 $message .= '. The SQL statement executed was: '.$this->getText().$par;
516             throw new 万博manbetx手机_万博体育manbetx正网_万博manbetx体育客户端(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
517                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
518         }
519     }
520 
521     /**
522      * Builds a SQL SELECT statement from the given query specification.
523      * @param array $query the query specification in name-value pairs. The following
524      * query options are supported: {@link select}, {@link distinct}, {@link from},
525      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
526      * {@link limit}, {@link offset} and {@link union}.
527      * @return string the SQL statement
528      * @since 1.1.6

Stack Trace

#3
+
 /var/www/html/fantai/views/product/view.php(32): CActiveRecord->find("id> and cid=")
27 
28 </div>
29 <!--//分享-->
30 
31 <?php
32 $list = Product::model()->find("id>$model->id and cid=$model->cid");
33 $list1 = Product::model()->order('id desc')->find("id<$model->id and cid=$model->cid");
34 ?>
35 <div class="Related">
36     <p>上一篇: <?php if (!empty($list)) { ?><a target="_self" href="http://diaoluoshan.com/joefy.qiq/qspevdu/wjfx/je/rvpu;μ?qi" echo $list->url; ?>"><?php echo $list->title ?></a><?php
37         } else {
#8
+
 /var/www/html/fantai/protected/controllers/ProductController.php(99): CController->render("view", array("model" => null))
094             $this->optionInfo->seodescription = $model->description;
095         $this->cate = $cate;
096         $data = array(
097             'model' => $model,
098         );
099         $this->render('view', $data);
100     }
101 
102 
103     public function actionHits() {
104         if (isset($_GET['id'])) {
#16
+
 /var/www/html/fantai/common.php(14): CApplication->run()
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', 5);
11 require_once($yii);
12 $app = Yii::createWebApplication($config);
13 require_once($globals);
14 $app->run();
2019-11-20 06:45:35 Apache/2.2.15 (CentOS) Yii Framework/1.1.8