[10501] PDOException in Connection.php line 687

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

  1. $this->debug(false, '', $master);
  2. // 返回结果集
  3. return $this->getResult($pdo, $procedure);
  4. } catch (\PDOException $e) {
  5. if ($this->isBreak($e)) {
  6. return $this->close()->query($sql, $bind, $master, $pdo);
  7. }
  8. throw new PDOException($e, $this->config, $this->getLastsql());
  9. } catch (\Throwable $e) {
  10. if ($this->isBreak($e)) {
  11. return $this->close()->query($sql, $bind, $master, $pdo);
  12. }
  13. throw $e;
  14. } catch (\Exception $e) {
  15. if ($this->isBreak($e)) {
  16. return $this->close()->query($sql, $bind, $master, $pdo);

Call Stack

  1. in Connection.php line 687
  2. at Connection->query('SELECT COUNT(*) AS t...', ['ThinkBind_1_' => [1, 1], 'ThinkBind_2_' => [0, 1]], false, true) in Connection.php line 1299
  3. at Connection->value(object(Query), 'COUNT(*) AS tp_count', 0, false) in Connection.php line 1327
  4. at Connection->aggregate(object(Query), 'COUNT', '*') in Query.php line 623
  5. at Query->aggregate('COUNT', '*', true) in Query.php line 658
  6. at Query->count() in Query.php line 1784
  7. at Query->paginate(9, false, ['query' => []]) in Store.php line 56
  8. at Store->index()
  9. at ReflectionMethod->invokeArgs(object(Store), []) in Container.php line 395
  10. at Container->invokeReflectMethod(object(Store), object(ReflectionMethod), ['convert' => false]) in Module.php line 132
  11. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  12. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  13. at Middleware->think\{closure}(object(Request))
  14. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  15. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  16. at Module->exec() in Dispatch.php line 168
  17. at Dispatch->run() in App.php line 432
  18. at App->think\{closure}(object(Request), object(Closure), null)
  19. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  20. at Middleware->think\{closure}(object(Request))
  21. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  22. at Middleware->dispatch(object(Request)) in App.php line 435
  23. at App->run() 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 '' 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 '' at line 1
Error SQL SELECT COUNT(*) AS tp_count FROM `z_industry` WHERE `status` = 1 AND `delete_time` = 0 AND `cate_id` =
Database Config
type mysql
hostname mysql.sql161.cdncenter.net
database sq_kuaile1
hostport 3306
dsn
params []
charset utf8mb4
prefix z_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
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
break_match_str []

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
PHPRC C:\php56\
PHP_FCGI_MAX_REQUESTS 10000
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_ID Normal_(i)_32
CommonProgramFiles C:\Program Files\Common Files
COMPUTERNAME WIN-NLRTEOW2ILZ
ComSpec C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK NO
LOCALAPPDATA C:\Windows\system32\config\systemprofile\AppData\Local
OS Windows_NT
Path C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\php5;C:\Program Files\WinRAR;C:\Windows\System32\inetsrv;C:\salt
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE x86
PROCESSOR_IDENTIFIER x86 Family 6 Model 45 Stepping 7, GenuineIntel
PROCESSOR_LEVEL 6
PROCESSOR_REVISION 2d07
ProgramData C:\ProgramData
ProgramFiles C:\Program Files
PSModulePath C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files\Microsoft Security Client\MpProvider\
PUBLIC C:\Users\Public
SystemDrive C:
SystemRoot C:\Windows
TEMP C:\Windows\TEMP
TMP C:\Windows\TEMP
USERDOMAIN WORKGROUP
USERNAME WIN-NLRTEOW2ILZ$
USERPROFILE C:\Windows\system32\config\systemprofile
windir C:\Windows
ORIG_PATH_INFO /index.php/store.html
URL /index.php
SERVER_SOFTWARE Microsoft-IIS/7.0
SERVER_PROTOCOL HTTP/1.1
SERVER_PORT_SECURE 0
SERVER_PORT 80
SERVER_NAME www.kuaileyiyanglao.com
SCRIPT_NAME /index.php
REQUEST_METHOD GET
REMOTE_USER
REMOTE_PORT 39614
REMOTE_HOST 44.213.80.203
REMOTE_ADDR 44.213.80.203
QUERY_STRING
PATH_TRANSLATED D:\wwwroot\kuaile123\wwwroot\index.php\store.html
PATH_INFO /store.html
LOGON_USER
LOCAL_ADDR 180.153.100.28
INSTANCE_META_PATH /LM/W3SVC/43
INSTANCE_ID 43
HTTPS_SERVER_SUBJECT
HTTPS_SERVER_ISSUER
HTTPS_SECRETKEYSIZE
HTTPS_KEYSIZE
HTTPS off
GATEWAY_INTERFACE CGI/1.1
CONTENT_TYPE
CONTENT_LENGTH 0
CERT_SUBJECT
CERT_SERIALNUMBER
CERT_ISSUER
CERT_FLAGS
CERT_COOKIE
AUTH_USER
AUTH_PASSWORD
AUTH_TYPE
APPL_PHYSICAL_PATH D:\wwwroot\kuaile123\wwwroot\
APPL_MD_PATH /LM/W3SVC/43/ROOT
IIS_UrlRewriteModule 7.1.0761.0
UNENCODED_URL /store.html
IIS_WasUrlRewritten 1
SCRIPT_FILENAME D:\wwwroot\kuaile123\wwwroot\index.php
REQUEST_URI /store.html
DOCUMENT_ROOT D:\wwwroot\kuaile123\wwwroot
HTTP_X_ORIGINAL_URL /store.html
HTTP_USER_AGENT claudebot
HTTP_HOST www.kuaileyiyanglao.com
HTTP_ACCEPT */*
HTTP_CONTENT_LENGTH 0
FCGI_ROLE RESPONDER
PHP_SELF /index.php/store.html
REQUEST_TIME_FLOAT 1711627070.0903
REQUEST_TIME 1711627070
Environment Variablesempty
ThinkPHP Constants
APP_PATH D:\wwwroot\kuaile123\wwwroot/app/