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 'Alien Dwellings' SCREENSAVER' LIMIT 1' at line 1. The SQL statement executed was: SELECT * FROM `lovelover_ciku` `t` WHERE t.title='FREE 'Alien Dwellings' SCREENSAVER' LIMIT 1

/home1/wwwroot/www.marydown.com/sites/f/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

#3
+
 /home1/wwwroot/www.marydown.com/sites/protected/controllers/SiteController.php(1187): CActiveRecord->find(CDbCriteria)
1182 
1183             //相关关键词 开始        
1184             $model=new LoveloverCiku;
1185             $criteria=new CDbCriteria;
1186             $criteria->condition="t.title='".$qqq."'";
1187             $data=$model->find($criteria);           
1188             //相关关键词 结束
1189 
1190             /*生成新缓存*/
1191             $arr2=Tool::object2array($data);
1192             $cache_data=serialize($arr2);
#13
+
 /home1/wwwroot/www.marydown.com/sites/index.php(18): CApplication->run()
13 defined('YII_DEBUG') or define('YII_DEBUG',true);
14 // specify how many levels of call stack should be shown in each log message
15 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
16 
17 require_once($yii);
18 Yii::createWebApplication($config)->run();
2024-03-29 08:34:05 nginx/1.14.1 Yii Framework/1.1.13