[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 '-15,15' 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 `tplay...', ['where_AND_status' => [1, 1], 'where_AND_cate_id' => [2, 1]], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `tplay...', ['where_AND_status' => [1, 1], 'where_AND_cate_id' => [2, 1]], false, false) in Query.php line 2522
  4. at Query->select() in Law.php line 113
  5. at Law->getlist(['status' => 1, 'cate_id' => 2]) in Law.php line 34
  6. at Law->index2()
  7. at ReflectionMethod->invokeArgs(object(Law), []) in App.php line 343
  8. at App::invokeMethod([object(Law), 'index2'], []) in App.php line 611
  9. at App::module(['index', 'law', 'index2'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  10. at App::exec(['type' => 'module', 'module' => ['index', 'law', 'index2']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('/www/wwwroot/cabp.or...') in index.php line 23

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 '-15,15' 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 '-15,15' at line 1
Error SQL SELECT * FROM `tplay_law` WHERE `status` = 1 AND `cate_id` = 2 ORDER BY `sort` DESC,`create_time` DESC LIMIT -15,15
Database Config
type mysql
hostname 127.0.0.1
database cabp
hostport 3306
dsn
params []
charset utf8
prefix tplay_
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 true
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
cabp.org.cn
PATH_INFO
/index/law/index2/page/0.shtml
REDIRECT_STATUS
200
SERVER_NAME
112.126.65.164
SERVER_PORT
443
SERVER_ADDR
172.22.251.93
REMOTE_PORT
45306
REMOTE_ADDR
3.94.150.98
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/cabp.org.cn/business_user/public
DOCUMENT_URI
/index.php
REQUEST_URI
/index/law/index2/page/0.shtml
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/index/law/index2/page/0.shtml
SCRIPT_FILENAME
/www/wwwroot/cabp.org.cn/business_user/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711615971.5766
REQUEST_TIME
1711615971
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/cabp.org.cn/business_user/public/../app/
TPLAY_VERSION
1.3.5
EXTEND_PATH
/www/wwwroot/cabp.org.cn/business_user/public/../extend/
VENDOR_PATH
/www/wwwroot/cabp.org.cn/business_user/public/../vendor/
THINK_VERSION
5.0.24
THINK_START_TIME
1711615971.5769
THINK_START_MEM
403592
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/cabp.org.cn/business_user/thinkphp/
LIB_PATH
/www/wwwroot/cabp.org.cn/business_user/thinkphp/library/
CORE_PATH
/www/wwwroot/cabp.org.cn/business_user/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/cabp.org.cn/business_user/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/cabp.org.cn/business_user/
RUNTIME_PATH
/www/wwwroot/cabp.org.cn/business_user/runtime/
LOG_PATH
/www/wwwroot/cabp.org.cn/business_user/runtime/log/
CACHE_PATH
/www/wwwroot/cabp.org.cn/business_user/runtime/cache/
TEMP_PATH
/www/wwwroot/cabp.org.cn/business_user/runtime/temp/
CONF_PATH
/www/wwwroot/cabp.org.cn/business_user/public/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false