[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,2,3) ) 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(12, false, ['type' => 'Bootstrap3', 'var_page' => 'page', 'list_rows' => 10, ...]) in Product.php line 37
  8. at Product->getAllProductDataById(',1,2,3') in Product.php line 33
  9. at Product->lists()
  10. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  11. at App::invokeMethod([object(Product), 'lists'], []) in App.php line 611
  12. at App::module([null, 'product', 'lists'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  13. at App::exec(['type' => 'module', 'module' => [null, 'product', 'lists'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  14. at App::run() in start.php line 18
  15. at require('E:\wwwroot\hfmxzn.co...') in index.php line 22

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,2,3) ) 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 '1,2,3) ) AND `isrecycle` = ? AND `ischeck` = ? LIMIT 1' at line 1
Error SQL SELECT COUNT(*) AS tp_count FROM `hope_product` WHERE ( cateid in (,1,2,3) ) AND `isrecycle` = 0 AND `ischeck` = 1 LIMIT 1
Database Config
type mysql
hostname 192.168.0.27
database hfmxzn_com
hostport 3306
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

ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Users\Administrator\AppData\Roaming
CLIENTNAME
WIN-9M8VKJTM48G
CommonProgramFiles
C:\Program Files\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
WIN-I9N9DPUR139
ComSpec
C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK
NO
HOMEDRIVE
C:
HOMEPATH
\Users\Administrator
LOCALAPPDATA
C:\Users\Administrator\AppData\Local
LOGONSERVER
\\WIN-I9N9DPUR139
NUMBER_OF_PROCESSORS
2
OS
Windows_NT
Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE
AMD64
PROCESSOR_IDENTIFIER
Intel64 Family 6 Model 62 Stepping 4, GenuineIntel
PROCESSOR_LEVEL
6
PROCESSOR_REVISION
3e04
ProgramData
C:\ProgramData
ProgramFiles
C:\Program Files
ProgramFiles(x86)
C:\Program Files (x86)
ProgramW6432
C:\Program Files
PSModulePath
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC
C:\Users\Public
SESSIONNAME
RDP-Tcp#0
SystemDrive
C:
SystemRoot
C:\Windows
TEMP
C:\Users\ADMINI~1\AppData\Local\Temp\1
TMP
C:\Users\ADMINI~1\AppData\Local\Temp\1
USERDOMAIN
WIN-I9N9DPUR139
USERNAME
Administrator
USERPROFILE
C:\Users\Administrator
windir
C:\Windows
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_CONNECTION
close
HTTP_X_FORWARDED_FOR
54.87.17.177
HTTP_X_REAL_IP
54.87.17.177
HTTP_HOST
www.hfmxzn.com
REDIRECT_STATUS
200
SERVER_NAME
127.0.0.1
SERVER_PORT
8018
SERVER_ADDR
192.168.0.23
REMOTE_PORT
61072
REMOTE_ADDR
192.168.0.9
SERVER_SOFTWARE
nginx/1.15.11
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.0
DOCUMENT_ROOT
E:/wwwroot/hfmxzn.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/product/anqing.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/product/anqing.html
PATH_TRANSLATED
E:/wwwroot/hfmxzn.com/public
PATH_INFO
/product/anqing.html
SCRIPT_FILENAME
E:/wwwroot/hfmxzn.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711644572.6036
REQUEST_TIME
1711644572
Environment Variables
empty

ThinkPHP Constants

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