[10501] PDOException in Connection.php line 388

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 'order desc LIMIT 0,6' at line 1

  1. $this->PDOStatement->execute();
  2. // 调试结束
  3. $this->debug(false);
  4. // 返回结果集
  5. return $this->getResult($pdo, $procedure);
  6. } catch (\PDOException $e) {
  7. if ($this->isBreak($e)) {
  8. return $this->close()->query($sql, $bind, $master, $pdo);
  9. }
  10. throw new PDOException($e, $this->config, $this->getLastsql());
  11. } catch (\ErrorException $e) {
  12. if ($this->isBreak($e)) {
  13. return $this->close()->query($sql, $bind, $master, $pdo);
  14. }
  15. throw $e;
  16. }
  17. }
  18. /**

Exception Datas

PDO Error Info
SQLSTATE
42000
Driver Error Code
1064
Driver Error Message
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 'order desc LIMIT 0,6' at line 1
Database Status
Error Code
10501
Error Message
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 'order desc LIMIT 0,6' at line 1
Error SQL
SELECT * FROM `yunu_content` `con` INNER JOIN `yunu_diy_article` `diy` ON `con`.`vid`=`diy`.`conid` WHERE `create_time` < 1600743399 AND `cid` IN (129) AND ( ( `area` is NULL ) or `area` = '' or `area` = ',,' or `area` LIKE '%,88888888,%' ) ORDER BY order desc LIMIT 0,6
Database Config
type
mysql
hostname
127.0.0.1
database
ztdhfy
username
ztdhfy
password
rbXx28JCmyTxcAL3
hostport
3306
dsn
params
[]
charset
utf8
prefix
yunu_
debug
0
deploy
0
rw_separate
master_num
1
slave_no
fields_strict
1
result_type
2
resultset_type
array
auto_timestamp
datetime_format
Y-m-d H:i:s
sql_explain
builder
query
\think\db\Query
break_reconnect
false