[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 '-26,30' 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 `id`,`title`,...', ['where_AND_issn' => ['', 2], 'where_AND_id' => [4, 1]], false, false) in Query.php line 255
  3. at Query->query('SELECT `id`,`title`,...', ['where_AND_issn' => ['', 2], 'where_AND_id' => [4, 1]], false, false) in Query.php line 2523
  4. at Query->select() in common.php line 762
  5. at relevantLiteratureGet('literature_pubmed') in Literature.php line 157
  6. at Literature->details()
  7. at ReflectionMethod->invokeArgs(object(Literature), []) in App.php line 343
  8. at App::invokeMethod([object(Literature), 'details'], []) in App.php line 611
  9. at App::module(['index', 'literature', 'details'], ['app_host' => '', 'app_debug' => 1, 'app_trace' => 0, ...], false) in App.php line 456
  10. at App::exec(['type' => 'module', 'module' => ['index', 'literature', 'details'], 'convert' => false], ['app_host' => '', 'app_debug' => 1, 'app_trace' => 0, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('/home/wwwroot/www_sh...') in index.php line 20

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 '-26,30' 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 '-26,30' at line 1
Error SQL SELECT `id`,`title`,`doi`,`pub_date`,`authors`,`abstract`,`article_id`,`pub_type`,`journal_title` FROM `literature_pubmed` WHERE `issn` = '' AND `id` <= 4 LIMIT -26,30
Database Config
type mysql
hostname localhost
database shengsci
hostport 3306
dsn
params []
charset utf8mb4
prefix
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict false
result_type 2
resultset_type \think\Collection
auto_timestamp false
datetime_format Y-m-d H:i:s
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.shengsci.com
PATH_INFO
/wenxian/2470013.html
REDIRECT_STATUS
200
SERVER_NAME
www.shengsci.com
SERVER_PORT
443
SERVER_ADDR
172.31.133.68
REMOTE_PORT
56388
REMOTE_ADDR
52.91.0.68
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/home/wwwroot/www_shengsci_com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/wenxian/2470013.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/wenxian/2470013.html
SCRIPT_FILENAME
/home/wwwroot/www_shengsci_com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711639289.556
REQUEST_TIME
1711639289
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/wwwroot/www_shengsci_com/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711639289.5563
THINK_START_MEM
379144
EXT
.php
DS
/
THINK_PATH
/home/wwwroot/www_shengsci_com/thinkphp/
LIB_PATH
/home/wwwroot/www_shengsci_com/thinkphp/library/
CORE_PATH
/home/wwwroot/www_shengsci_com/thinkphp/library/think/
TRAIT_PATH
/home/wwwroot/www_shengsci_com/thinkphp/library/traits/
ROOT_PATH
/home/wwwroot/www_shengsci_com/
EXTEND_PATH
/home/wwwroot/www_shengsci_com/extend/
VENDOR_PATH
/home/wwwroot/www_shengsci_com/vendor/
RUNTIME_PATH
/home/wwwroot/www_shengsci_com/runtime/
LOG_PATH
/home/wwwroot/www_shengsci_com/runtime/log/
CACHE_PATH
/home/wwwroot/www_shengsci_com/runtime/cache/
TEMP_PATH
/home/wwwroot/www_shengsci_com/runtime/temp/
CONF_PATH
/home/wwwroot/www_shengsci_com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
VIEW_PATH
/home/wwwroot/www_shengsci_com/public/../application/index/view/
IS_CLI
false
IS_WIN
false
URL_CALLBACK
http://www.shengsci.com/user/oauth/callback/type/