[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=78 ) 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 253
  5. at previous(null, 78) in ad3070e1e4c10c1734a5dd1998696644.php line 186
  6. at include('/www/wwwroot/www.nmg...') in File.php line 59
  7. at File->read('/www/wwwroot/www.nmg...', ['nav' => [['id' => 76, 'catname' => '关于研究院', 'img' => '', ...], ['id' => 78, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 77, 'catname' => '新金融在线', 'img' => '', ...], ...], 'navt' => [['id' => 76, 'catname' => '关于研究院', 'img' => '', ...], ['id' => 78, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 77, 'catname' => '新金融在线', 'img' => '', ...], ...], 'config' => ['sitetitle' => '...', 'sitename' => '...', 'sitekeywords' => '...', ...], ...]) in Template.php line 226
  8. at Template->fetch('/www/wwwroot/www.nmg...', ['nav' => [['id' => 76, 'catname' => '关于研究院', 'img' => '', ...], ['id' => 78, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 77, 'catname' => '新金融在线', 'img' => '', ...], ...], 'navt' => [['id' => 76, 'catname' => '关于研究院', 'img' => '', ...], ['id' => 78, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 77, 'catname' => '新金融在线', 'img' => '', ...], ...], 'config' => ['sitetitle' => '...', 'sitename' => '...', 'sitekeywords' => '...', ...], ...], []) in Think.php line 93
  9. at Think->fetch('show', ['nav' => [['id' => 76, 'catname' => '关于研究院', 'img' => '', ...], ['id' => 78, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 77, 'catname' => '新金融在线', 'img' => '', ...], ...], 'navt' => [['id' => 76, 'catname' => '关于研究院', 'img' => '', ...], ['id' => 78, 'catname' => '新闻资讯', 'img' => '', ...], ['id' => 77, 'catname' => '新金融在线', 'img' => '', ...], ...], 'config' => ['sitetitle' => '...', 'sitename' => '...', 'sitekeywords' => '...', ...], ...], []) 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=78 ) 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=78 ) ORDER BY `listorder` DESC LIMIT 1' at line 1
Error SQL SELECT * FROM `wb_article` WHERE ( id< and catid=78 ) ORDER BY `listorder` DESC LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database nmgxjr
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 nmgxjr.cn
HTTP2 on
H2PUSH off
H2_PUSH off
H2_PUSHED
H2_PUSHED_ON
H2_STREAM_ID 3
H2_STREAM_TAG 23295-14-3
proxy-nokeepalive 1
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
HTTP_REFERER http://nmgxjr.cn/index.php/index/index/show/id/2024/cid/78.html
HTTP_HOST nmgxjr.cn
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 nmgxjr.cn Port 443</address>
SERVER_SOFTWARE Apache
SERVER_NAME nmgxjr.cn
SERVER_ADDR 10.61.84.200
SERVER_PORT 443
REMOTE_ADDR 44.222.249.19
DOCUMENT_ROOT /www/wwwroot/www.nmgxjr.org.cn/public
REQUEST_SCHEME https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /www/wwwroot/www.nmgxjr.org.cn/public
SERVER_ADMIN webmaster@example.com
SCRIPT_FILENAME /www/wwwroot/www.nmgxjr.org.cn/public/index.php
REMOTE_PORT 52680
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/2.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /index.php/index/index/show/id/2024/cid/78.html
SCRIPT_NAME /index.php
PATH_INFO /index/index/show/id/2024/cid/78.html
PATH_TRANSLATED /www/wwwroot/www.nmgxjr.org.cn/public/index/index/show/id/2024/cid/78.html
PHP_SELF /index.php/index/index/show/id/2024/cid/78.html
REQUEST_TIME_FLOAT 1711657972.4336
REQUEST_TIME 1711657972
Environment Variablesempty
ThinkPHP Constantsempty