[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 ') ) AND `isrecycle` = ? AND `ischeck` = ? LIMIT 1' 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 COUNT(*) AS t...', ['where_isrecycle' => [0, 1], 'where_ischeck' => [1, 1]], false, true) in Query.php line 227
  3. at Query->query('SELECT COUNT(*) AS t...', ['where_isrecycle' => [0, 1], 'where_ischeck' => [1, 1]], false, true) in Query.php line 2267
  4. at Query->getPdo() in Query.php line 413
  5. at Query->value('COUNT(*) AS tp_count', 0, true) in Query.php line 519
  6. at Query->count() in Query.php line 1340
  7. at Query->paginate(8, false, ['type' => 'Bootstrap3', 'var_page' => 'page', 'list_rows' => 10, ...]) in Article.php line 42
  8. at Article->getAllArticleDataById('', 8) in Article.php line 31
  9. at Article->lists()
  10. at ReflectionMethod->invokeArgs(object(Article), []) in App.php line 343
  11. at App::invokeMethod([object(Article), 'lists'], []) in App.php line 611
  12. at App::module([null, 'article', 'lists'], ['app_host' => '', 'app_debug' => 1, 'app_trace' => false, ...], false) in App.php line 456
  13. at App::exec(['type' => 'module', 'module' => [null, 'article', 'lists'], 'convert' => false], ['app_host' => '', 'app_debug' => 1, 'app_trace' => false, ...]) in App.php line 139
  14. at App::run() in start.php line 18
  15. at require('D:\wwwroot\jhzm8881....') in index.php line 17

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 `isrecycle` = ? AND `ischeck` = ? 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 `isrecycle` = ? AND `ischeck` = ? LIMIT 1' at line 1
Error SQL SELECT COUNT(*) AS tp_count FROM `hope_article` WHERE ( cateid in () ) AND `isrecycle` = 0 AND `ischeck` = 1 LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database jhzm8881_com
hostport
dsn
params []
charset utf8
prefix hope_
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
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\
SYSTEMROOT
C:\Windows
COMSPEC
C:\Windows\system32\cmd.exe
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR
C:\Windows
PHPRC
D:/phpstudy_pro/Extensions/php/php7.3.4nts
_FCGI_SHUTDOWN_EVENT_
9740
HTTP_CONNECTION
close
SCRIPT_NAME
/index.php
REQUEST_URI
/Article/lists/cateid/31.html
QUERY_STRING
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_URL
/Article/lists/cateid/31.html
REMOTE_PORT
33766
SCRIPT_FILENAME
D:/wwwroot/jhzm8881.com/public/index.php
SERVER_ADMIN
admin@example.com
CONTEXT_DOCUMENT_ROOT
D:/wwwroot/jhzm8881.com/public
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
D:/wwwroot/jhzm8881.com/public
REMOTE_ADDR
3.239.59.193
SERVER_PORT
80
SERVER_ADDR
172.16.238.223
SERVER_NAME
www.jhzm888.com
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
SystemRoot
C:\Windows
HTTP_HOST
www.jhzm888.com
HTTP_REFERER
http://jhzm888.com/Article/lists/cateid/31.html
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
REDIRECT_STATUS
200
REDIRECT_PATH_INFO
Article/lists/cateid/31.html
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710839442.938
REQUEST_TIME
1710839442
PATH_INFO
Article/lists/cateid/31.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
D:\wwwroot\jhzm8881.com\public/../application/
THINK_VERSION
5.0.11
THINK_START_TIME
1710839442.938
THINK_START_MEM
407160
EXT
.php
DS
\
THINK_PATH
D:\wwwroot\jhzm8881.com\thinkphp\
LIB_PATH
D:\wwwroot\jhzm8881.com\thinkphp\library\
CORE_PATH
D:\wwwroot\jhzm8881.com\thinkphp\library\think\
TRAIT_PATH
D:\wwwroot\jhzm8881.com\thinkphp\library\traits\
ROOT_PATH
D:\wwwroot\jhzm8881.com\
EXTEND_PATH
D:\wwwroot\jhzm8881.com\extend\
VENDOR_PATH
D:\wwwroot\jhzm8881.com\vendor\
RUNTIME_PATH
D:\wwwroot\jhzm8881.com\runtime\
LOG_PATH
D:\wwwroot\jhzm8881.com\runtime\log\
CACHE_PATH
D:\wwwroot\jhzm8881.com\runtime\cache\
TEMP_PATH
D:\wwwroot\jhzm8881.com\runtime\temp\
CONF_PATH
D:\wwwroot\jhzm8881.com\public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true