系统发生错误

#0 [10501]PDOException in PDOConnection.php line 797

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 `scode` IS NULL AND `status` = ? AND `date` < ? ORDER BY `id` DESC LIMIT 1' at line 1

  1. }
  2. } else {
  3. if ($this->reConnectTimes < 4 && $this->isBreak($e)) {
  4. ++$this->reConnectTimes;
  5. return $this->close()->getPDOStatement($sql, $bind, $master, $procedure);
  6. }
  7. }
  8. if ($e instanceof \PDOException) {
  9. throw new PDOException($e, $this->config, $this->getLastsql());
  10. } else {
  11. throw $e;
  12. }
  13. }
  14. }
  15. /**
  16. * 执行语句
  17. * @access protected

Call Stack

  1. in PDOConnection.php line 797
  2. at PDOConnection->getPDOStatement() in PDOConnection.php line 711
  3. at PDOConnection->pdoQuery() in PDOConnection.php line 878
  4. at PDOConnection->find() in BaseQuery.php line 1193
  5. at BaseQuery->find() in ResultOperation.php line 163
  6. at BaseQuery->findOrEmpty() in ContentModel.php line 57
  7. at ContentModel->getPrev() in Content.php line 54
  8. at Content->dispatch() in app.php line 84
  9. at Http->{closure}() in Container.php line 294
  10. at Container->invokeFunction() in Container.php line 358
  11. at Container->invoke() in Callback.php line 27
  12. at Callback->exec() in Dispatch.php line 80
  13. at Dispatch->run() in Route.php line 793
  14. at Route->think\{closure}() in Pipeline.php line 59
  15. at Pipeline->think\{closure}() in Pipeline.php line 66
  16. at Pipeline->then() in Route.php line 794
  17. at Route->dispatch() in Http.php line 216
  18. at Http->dispatchToRoute() in Http.php line 206
  19. at Http->think\{closure}() in Pipeline.php line 59
  20. at Pipeline->think\{closure}() in MultiApp.php line 51
  21. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  22. at Pipeline->think\{closure}() in Pipeline.php line 66
  23. at Pipeline->then() in MultiApp.php line 52
  24. at MultiApp->handle()
  25. at call_user_func() in Middleware.php line 142
  26. at Middleware->think\{closure}() in Pipeline.php line 85
  27. at Pipeline->think\{closure}() in SessionInit.php line 67
  28. at SessionInit->handle()
  29. at call_user_func() in Middleware.php line 142
  30. at Middleware->think\{closure}() in Pipeline.php line 85
  31. at Pipeline->think\{closure}() in TraceDebug.php line 71
  32. at TraceDebug->handle()
  33. at call_user_func() in Middleware.php line 142
  34. at Middleware->think\{closure}() in Pipeline.php line 85
  35. at Pipeline->think\{closure}() in Pipeline.php line 66
  36. at Pipeline->then() in Http.php line 207
  37. at Http->runWithRequest() in Http.php line 170
  38. at Http->run() in index.php line 29

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 `scode` IS NULL AND `status` = ? AND `date` < ? ORDER BY `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 `scode` IS NULL AND `status` = ? AND `date` < ? ORDER BY `id` DESC LIMIT 1' at line 1
Error SQL SELECT * FROM `ay_content` WHERE `id` < AND `scode` IS NULL AND `status` = 1 AND `date` < '2026-11-21 22:15:10' ORDER BY `id` DESC LIMIT 1
Database Config
type mysql
hostname localhost
database gdmpas
hostport 3306
dsn
params []
charset utf8mb4
prefix ay_
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
fields_cache false
trigger_sql true
builder
query
break_reconnect false
break_match_str []
auto_param_bind true
schema_cache_path /www/wwwroot/drug-tp/runtime/schema/

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
HTTP_HOST www.gdmpas.com
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME gdmpas.com
SERVER_PORT 443
SERVER_ADDR 172.23.72.53
REMOTE_PORT 58932
REMOTE_ADDR 216.73.216.102
SERVER_SOFTWARE nginx/1.22.0
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /www/wwwroot/drug-tp/public
DOCUMENT_URI /index.php
REQUEST_URI /tongzhi/240
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/tongzhi/240
SCRIPT_FILENAME /www/wwwroot/drug-tp/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1795270509.729
REQUEST_TIME 1795270509