[10501] PDOException in Connection.php line 388

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 '-1,10' at line 1

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

Call Stack

  1. in Connection.php line 388
  2. at Connection->query('SELECT `id`,`pid`,`f...', [], false, false) in Query.php line 227
  3. at Query->query('SELECT `id`,`pid`,`f...', [], false, false) in Query.php line 2343
  4. at Query->select() in Content.php line 43
  5. at Content->select_index_do('pid = 83 OR fid = 83', '10', null) in Html.php line 32
  6. at Html->article()
  7. at ReflectionMethod->invokeArgs(object(Html), []) in App.php line 197
  8. at App::invokeMethod([object(Html), 'article'], []) in App.php line 411
  9. at App::module(['index', 'html', 'article'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 296
  10. at App::exec(['type' => 'module', 'module' => ['index', 'html', 'article']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  11. at App::run() in start.php line 18
  12. at require('D:\wwwroot\www.sxbwj...') in index.php line 24

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 '-1,10' 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 '-1,10' at line 1
Error SQL
SELECT `id`,`pid`,`fid`,`title`,`model`,`picture`,`lable`,`summary`,`sorting`,`url`,`create_time`,`views`,`page_tpl`,`headlines`,`recommend`,`state` FROM `buercms_content` WHERE ( pid = 83 OR fid = 83 ) ORDER BY sorting desc,create_time desc LIMIT -1,10
Database Config
type
mysql
hostname
buerzhuku.mysql.rds.aliyuncs.com
database
cms_zyzg_com
hostport
3306
dsn
params
[]
charset
utf8
prefix
buercms_
debug
true
deploy
0
rw_separate
false
master_num
1
slave_no
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

Environment Variables

GET Data

page
Resource
POST Data
empty
Files
empty
Cookies
empty

Session

think
{ "site": { "id": 1, "name": "\u3010\u5b98\u7f51\u3011\u9655\u897f\u535a\u4e3a\u6559\u80b2\u79d1\u6280\u6709\u9650\u516c\u53f8", "switch": "\u5426", "development_mode": "\u662f", "domain": "http:\/\/www.sxbwjykj.com\/", "logo": "public\/uploads\/logo.png", "statistical_code": "", "telphone": "029-88339538", "fax": "029-88339539", "address": "\u9655\u897f\u7701\u897f\u5b89\u5e02\u79d1\u6280\u897f\u8def\u7eff\u5730\u535a\u6d77\u5927\u53a6", "record": "\u9655ICP\u5907154775411\u53f7", "each_page_number": "10", "seo_meta": "", "seo_title": "\u4e13\u4e1a\u8f6f\u786c\u4ef6\u670d\u52a1\u4f9b\u5e94\u5546", "seo_keyword": "\u9655\u897f\u535a\u4e3a\u6559\u80b2\u79d1\u6280\u6709\u9650\u516c\u53f8\u5b98\u7f51", "seo_description": "\u9655\u897f\u535a\u4e3a\u6559\u80b2\u79d1\u6280\u6709\u9650\u516c\u53f8" } }

Server/Request Data

PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\python;C:\Program Files\python\Scripts;;D:\BtSoft\panel\script;D:\BtSoft\php\73;C:\ProgramData\ComposerSetup\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
SYSTEMROOT
C:\Windows
COMSPEC
C:\Windows\system32\cmd.exe
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR
C:\Windows
_FCGI_SHUTDOWN_EVENT_
4148
HTTP_CONNECTION
close
SCRIPT_NAME
/index.php
REQUEST_URI
/index.php?s=/html/article/83.html
QUERY_STRING
s=/html/article/83.html
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REMOTE_PORT
20000
SCRIPT_FILENAME
D:/wwwroot/www.sxbwjykj.com/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
D:/wwwroot/www.sxbwjykj.com
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
D:/wwwroot/www.sxbwjykj.com
REMOTE_ADDR
154.219.75.112
SERVER_PORT
80
SERVER_ADDR
172.16.9.230
SERVER_NAME
www.sxbwjykj.com
SERVER_SOFTWARE
Apache/2.4.39 (Win32) OpenSSL/1.0.2s mod_fcgid/2.3.9a
SERVER_SIGNATURE
SystemRoot
C:\Windows
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.sxbwjykj.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1579428506.0849
REQUEST_TIME
1579428506
PATH_INFO
/html/article/83.html
Environment Variables
empty

ThinkPHP Constants

APP_DEBUG
false
APP_PATH
D:\wwwroot\www.sxbwjykj.com/application/
BIND_MODULE
index
DOMAIN
http://www.sxbwjykj.com
RELATIVE_TPL_PATH
template/default
THINK_VERSION
5.0.12
THINK_START_TIME
1579428506.0866
THINK_START_MEM
260672
EXT
.php
DS
\
THINK_PATH
D:\wwwroot\www.sxbwjykj.com\thinkphp\
LIB_PATH
D:\wwwroot\www.sxbwjykj.com\thinkphp\library\
CORE_PATH
D:\wwwroot\www.sxbwjykj.com\thinkphp\library\think\
TRAIT_PATH
D:\wwwroot\www.sxbwjykj.com\thinkphp\library\traits\
ROOT_PATH
D:\wwwroot\www.sxbwjykj.com\
EXTEND_PATH
D:\wwwroot\www.sxbwjykj.com\extend\
VENDOR_PATH
D:\wwwroot\www.sxbwjykj.com\vendor\
RUNTIME_PATH
D:\wwwroot\www.sxbwjykj.com\runtime\
LOG_PATH
D:\wwwroot\www.sxbwjykj.com\runtime\log\
CACHE_PATH
D:\wwwroot\www.sxbwjykj.com\runtime\cache\
TEMP_PATH
D:\wwwroot\www.sxbwjykj.com\runtime\temp\
CONF_PATH
D:\wwwroot\www.sxbwjykj.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true
TPL_PATH
D:\wwwroot\www.sxbwjykj.com\template/default/