[10501] PDOException in Connection.php line 687

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 catid=85 ) ORDER BY `listorder` DESC LIMIT 1' at line 1

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

Call Stack

  1. in Connection.php line 687
  2. at Connection->query('SELECT * FROM `wb_ar...', [], false, false) in Connection.php line 844
  3. at Connection->find(object(Query)) in Query.php line 3152
  4. at Query->find() in common.php line 304
  5. at previous(null, 85) in bc6b4bfc3f0ceafc803191ace01b013a.php line 68
  6. at include('/www/wwwroot/nmgford...') in File.php line 59
  7. at File->read('/www/wwwroot/nmgford...', ['menu' => [['id' => 1, 'name' => '系统设置', 'parentid' => 0, ...], ['id' => 3, 'name' => '内容', 'parentid' => 0, ...], ['id' => 21, 'name' => '权限管理', 'parentid' => 0, ...], ...], 'nav' => [['id' => 76, 'catname' => '公司简介', 'img' => '', ...], ['id' => 77, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 78, 'catname' => '车型展示', 'img' => '', ...], ...], 'navt' => [['id' => 76, 'catname' => '公司简介', 'img' => '', ...], ['id' => 77, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 78, 'catname' => '车型展示', 'img' => '', ...], ...], ...]) in Template.php line 226
  8. at Template->fetch('/www/wwwroot/nmgford...', ['menu' => [['id' => 1, 'name' => '系统设置', 'parentid' => 0, ...], ['id' => 3, 'name' => '内容', 'parentid' => 0, ...], ['id' => 21, 'name' => '权限管理', 'parentid' => 0, ...], ...], 'nav' => [['id' => 76, 'catname' => '公司简介', 'img' => '', ...], ['id' => 77, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 78, 'catname' => '车型展示', 'img' => '', ...], ...], 'navt' => [['id' => 76, 'catname' => '公司简介', 'img' => '', ...], ['id' => 77, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 78, 'catname' => '车型展示', 'img' => '', ...], ...], ...], []) in Think.php line 93
  9. at Think->fetch('show', ['menu' => [['id' => 1, 'name' => '系统设置', 'parentid' => 0, ...], ['id' => 3, 'name' => '内容', 'parentid' => 0, ...], ['id' => 21, 'name' => '权限管理', 'parentid' => 0, ...], ...], 'nav' => [['id' => 76, 'catname' => '公司简介', 'img' => '', ...], ['id' => 77, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 78, 'catname' => '车型展示', 'img' => '', ...], ...], 'navt' => [['id' => 76, 'catname' => '公司简介', 'img' => '', ...], ['id' => 77, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 78, 'catname' => '车型展示', 'img' => '', ...], ...], ...], []) in View.php line 192
  10. at View->fetch('show', [], [], false) in View.php line 42
  11. at View->output('show') in Response.php line 396
  12. at Response->getContent() in Response.php line 128
  13. at Response->send() in index.php line 21

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 'and catid=85 ) ORDER BY `listorder` DESC LIMIT 1' 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 'and catid=85 ) ORDER BY `listorder` DESC LIMIT 1' at line 1
Error SQL SELECT * FROM `wb_article` WHERE ( id< and catid=85 ) ORDER BY `listorder` DESC LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database sanhe
hostport 3306
dsn
params []
charset utf8
prefix wb_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
resultset_type array
auto_timestamp false
datetime_format Y-m-d H:i:s
sql_explain false
builder
query \think\db\Query
break_reconnect false
break_match_str []

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
HTTPS on
SSL_TLS_SNI nmgford.com
HTTP2 on
H2PUSH off
H2_PUSH off
H2_PUSHED
H2_PUSHED_ON
H2_STREAM_ID 3
H2_STREAM_TAG 420-133-3
proxy-nokeepalive 1
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
HTTP_REFERER http://nmgford.com/index.php/Index/Index/show/id/3481/cid/85
HTTP_HOST nmgford.com
PATH /www/server/panel/pyenv/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
LD_LIBRARY_PATH /www/server/apache/lib
SERVER_SIGNATURE <address>Apache Server at nmgford.com Port 443</address>
SERVER_SOFTWARE Apache
SERVER_NAME nmgford.com
SERVER_ADDR 10.61.84.200
SERVER_PORT 443
REMOTE_ADDR 3.88.16.192
DOCUMENT_ROOT /www/wwwroot/nmgford.com/public
REQUEST_SCHEME https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /www/wwwroot/nmgford.com/public
SERVER_ADMIN webmaster@example.com
SCRIPT_FILENAME /www/wwwroot/nmgford.com/public/index.php
REMOTE_PORT 34596
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/2.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /index.php/Index/Index/show/id/3481/cid/85
SCRIPT_NAME /index.php
PATH_INFO /Index/Index/show/id/3481/cid/85
PATH_TRANSLATED /www/wwwroot/nmgford.com/public/Index/Index/show/id/3481/cid/85
PHP_SELF /index.php/Index/Index/show/id/3481/cid/85
REQUEST_TIME_FLOAT 1711645360.5728
REQUEST_TIME 1711645360
Environment Variablesempty
ThinkPHP Constantsempty