[10501] PDOException in Connection.php line 385

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 article_id<1052 ) ORDER BY `article_id` DESC LIMIT 1' at line 1

  1. $this->PDOStatement->execute();
  2. // 调试结束
  3. $this->debug(false, '', $master);
  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 (\Throwable $e) {
  12. if ($this->isBreak($e)) {
  13. return $this->close()->query($sql, $bind, $master, $pdo);
  14. }
  15. throw $e;
  16. } catch (\Exception $e) {
  17. if ($this->isBreak($e)) {
  18. return $this->close()->query($sql, $bind, $master, $pdo);
  19. }

Call Stack

  1. in Connection.php line 385
  2. at Connection->query('SELECT * FROM `hj_ar...', [], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `hj_ar...', [], false, false) in Query.php line 2686
  4. at Query->find() in News.php line 210
  5. at News->show()
  6. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  7. at App::invokeMethod([object(News), 'show'], []) in App.php line 611
  8. at App::module(['index', 'news', 'show'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['index', 'news', 'show']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/data/user/htdocs/co...') in index.php line 75

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 article_id<1052 ) ORDER BY `article_id` 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 article_id<1052 ) ORDER BY `article_id` DESC LIMIT 1' at line 1
Error SQL SELECT * FROM `hj_article` WHERE ( cate_id = AND article_id<1052 ) ORDER BY `article_id` DESC LIMIT 1
Database Config
type mysql
hostname bdm721906556.my3w.com
database bdm721906556_db
hostport
dsn
params []
charset utf8
prefix hj_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
result_type 2
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
key {Z#E-YkVxNAl>9|rPib+gFXed&41=KO$wHRChz%Tc}

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
nobody
HOME
/
HTTP_HOST
sxzhlm.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
REDIRECT_STATUS
200
SERVER_NAME
wh-nba7dc8enmhgczt8p5n.my3w.com
SERVER_PORT
80
SERVER_ADDR
172.21.55.113
REMOTE_PORT
34744
REMOTE_ADDR
44.221.46.132
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/data/user/htdocs/public
DOCUMENT_URI
/index.php
REQUEST_URI
/index/news/show/article_id/1052.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/index/news/show/article_id/1052.html
PATH_INFO
/index/news/show/article_id/1052.html
SCRIPT_FILENAME
/data/user/htdocs/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711659122.3563
REQUEST_TIME
1711659122
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/data/user/htdocs/public/../app/
CONF_PATH
/data/user/htdocs/public/../data/config/
RUNTIME_PATH
/data/user/htdocs/public/../data/caches/
VERSION
2.0
COOKIE_PRE
LYq_
COOKIE_DOMAIN
http://sxzhlm.cxkaifa.com/
COOKIE_PATH
/
WEBURL
http://sxzhlm.cxkaifa.com/
MWEBURL
http://sxzhlm.cxkaifa.com/
CHARSET
utf-8
R
/statics/
DATA_PATH
/data/user/htdocs/public/../data/
ATTACHMENT_URL
/uploadfile/
_KEY
key
ATTACHMENT_ROOT
/data/user/htdocs/public/uploadfile/
THINK_VERSION
5.0.24
THINK_START_TIME
1711659122.3564
THINK_START_MEM
348400
EXT
.php
DS
/
THINK_PATH
/data/user/htdocs/core/
LIB_PATH
/data/user/htdocs/core/library/
CORE_PATH
/data/user/htdocs/core/library/think/
TRAIT_PATH
/data/user/htdocs/core/library/traits/
ROOT_PATH
/data/user/htdocs/
EXTEND_PATH
/data/user/htdocs/extend/
VENDOR_PATH
/data/user/htdocs/vendor/
LOG_PATH
/data/user/htdocs/public/../data/caches/log/
CACHE_PATH
/data/user/htdocs/public/../data/caches/cache/
TEMP_PATH
/data/user/htdocs/public/../data/caches/temp/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HDOM_TYPE_ELEMENT
1
HDOM_TYPE_COMMENT
2
HDOM_TYPE_TEXT
3
HDOM_TYPE_ENDTAG
4
HDOM_TYPE_ROOT
5
HDOM_TYPE_UNKNOWN
6
HDOM_QUOTE_DOUBLE
0
HDOM_QUOTE_SINGLE
1
HDOM_QUOTE_NO
3
HDOM_INFO_BEGIN
0
HDOM_INFO_END
1
HDOM_INFO_QUOTE
2
HDOM_INFO_SPACE
3
HDOM_INFO_TEXT
4
HDOM_INFO_INNER
5
HDOM_INFO_OUTER
6
HDOM_INFO_ENDSPACE
7
DEFAULT_TARGET_CHARSET
UTF-8
DEFAULT_BR_TEXT
DEFAULT_SPAN_TEXT
MAX_FILE_SIZE
600000
HDOM_SMARTY_AS_TEXT
1