[10501] PDOException in Connection.php line 399

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 'then 0 else 1 end LIMIT 8' 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->config['break_reconnect'] && $this->isBreak($e)) {
  8. return $this->close()->query($sql, $bind, $master, $pdo);
  9. }
  10. throw new PDOException($e, $this->config, $this->getLastsql());
  11. }
  12. }
  13. /**
  14. * 执行语句
  15. * @access public
  16. * @param string $sql sql指令
  17. * @param array $bind 参数绑定
  18. * @return int

Call Stack

  1. in Connection.php line 399
  2. at Connection->query('SELECT * FROM `proje...', [], false, false) in Query.php line 225
  3. at Query->query('SELECT * FROM `proje...', [], false, false) in Query.php line 2297
  4. at Query->select() in ProjectController.php line 31
  5. at ProjectController->info()
  6. at ReflectionMethod->invokeArgs(object(ProjectController), []) in App.php line 224
  7. at App::invokeMethod([object(ProjectController), 'info'], []) in App.php line 394
  8. at App::module(['home', 'Project', 'info'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 130
  9. at App::run() in start.php line 18
  10. at require('C:\wwwroot\veidingNe...') 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 'then 0 else 1 end LIMIT 8' 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 'then 0 else 1 end LIMIT 8' at line 1
Error SQL SELECT * FROM `project` ORDER BY case when project_classify= then 0 else 1 end LIMIT 8
Database Config
type mysql
hostname 127.0.0.1
database veiding
username veiding
password veiding123456
hostport 3306
dsn
params []
charset utf8mb4
prefix
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
db_path C:\wwwroot\veidingNewGit\php\/backup/
db_part 20971520
db_compress 0
db_level 9

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

_FCGI_X_PIPE_
\\.\pipe\IISFCGI-02f929b5-d537-48ab-826c-aef2c101aac2
PHP_FCGI_MAX_REQUESTS
10000
ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_CONFIG
APP_POOL_ID
CommonProgramFiles
C:\Program Files\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
veidingwin
ComSpec
C:\Windows\system32\cmd.exe
DriverData
C:\Windows\System32\Drivers\DriverData
LOCALAPPDATA
C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS
2
OS
Windows_NT
Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NetSarang\Xshell 7\;C:\Program Files (x86)\NetSarang\Xftp 7\;C:\Program Files\Git\cmd;C:\Hws.com\HwsHostMaster\phpweb\php74;C:\Program Files\TortoiseGit\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE
AMD64
PROCESSOR_IDENTIFIER
Intel64 Family 6 Model 85 Stepping 7, GenuineIntel
PROCESSOR_LEVEL
6
PROCESSOR_REVISION
5507
ProgramData
C:\ProgramData
ProgramFiles
C:\Program Files
ProgramFiles(x86)
C:\Program Files (x86)
ProgramW6432
C:\Program Files
PSModulePath
C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC
C:\Users\Public
SystemDrive
C:
SystemRoot
C:\Windows
TEMP
C:\Windows\TEMP
TMP
C:\Windows\TEMP
USERDOMAIN
WORKGROUP
USERNAME
veidingwin$
USERPROFILE
C:\Windows\system32\config\systemprofile
windir
C:\Windows
ORIG_PATH_INFO
/index.php/Project/info/id/index.html
URL
/index.php
SERVER_SOFTWARE
Microsoft-IIS/10.0
SERVER_PROTOCOL
HTTP/1.1
SERVER_PORT_SECURE
1
SERVER_PORT
443
SERVER_NAME
www.veiding.cn
SCRIPT_NAME
/index.php
SCRIPT_FILENAME
C:\wwwroot\veidingNewGit\php\public\index.php
REQUEST_URI
/Project/info/id/index.html
REQUEST_METHOD
GET
REMOTE_USER
REMOTE_PORT
41796
REMOTE_HOST
18.232.179.191
REMOTE_ADDR
18.232.179.191
QUERY_STRING
PATH_TRANSLATED
C:\wwwroot\veidingNewGit\php\public\index.php\Project\info\id\index.html
PATH_INFO
/Project/info/id/index.html
LOGON_USER
LOCAL_ADDR
172.22.147.63
INSTANCE_META_PATH
/LM/W3SVC/3
INSTANCE_NAME
INSTANCE_ID
3
HTTPS_SERVER_SUBJECT
CN=www.veiding.cn
HTTPS_SERVER_ISSUER
C=US, O=Let's Encrypt, CN=R3
HTTPS_SECRETKEYSIZE
2048
HTTPS_KEYSIZE
256
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
DOCUMENT_ROOT
C:\wwwroot\veidingNewGit\php\public
CONTENT_TYPE
CONTENT_LENGTH
0
CERT_SUBJECT
CERT_SERIALNUMBER
CERT_ISSUER
CERT_FLAGS
CERT_COOKIE
AUTH_USER
AUTH_PASSWORD
AUTH_TYPE
APPL_PHYSICAL_PATH
C:\wwwroot\veidingNewGit\php\public\
APPL_MD_PATH
/LM/W3SVC/3/ROOT
IIS_UrlRewriteModule
7.1.0871.0
UNENCODED_URL
/Project/info/id/index.html
IIS_WasUrlRewritten
1
HTTP_X_ORIGINAL_URL
/Project/info/id/index.html
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.veiding.cn
HTTP_ACCEPT
*/*
HTTP_CONTENT_LENGTH
0
HTTP_CONNECTION
close
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/Project/info/id/index.html
REQUEST_TIME_FLOAT
1711720973.3151
REQUEST_TIME
1711720973
Environment Variables
empty

ThinkPHP Constants

APP_PATH
C:\wwwroot\veidingNewGit\php\public/../Apps/
BIND_MODULE
home
CONF_PATH
C:\wwwroot\veidingNewGit\php\public/../config/
THINK_VERSION
5.0.7
THINK_START_TIME
1711720973.316
THINK_START_MEM
407824
EXT
.php
DS
\
THINK_PATH
C:\wwwroot\veidingNewGit\php\thinkphp\
LIB_PATH
C:\wwwroot\veidingNewGit\php\thinkphp\library\
CORE_PATH
C:\wwwroot\veidingNewGit\php\thinkphp\library\think\
TRAIT_PATH
C:\wwwroot\veidingNewGit\php\thinkphp\library\traits\
ROOT_PATH
C:\wwwroot\veidingNewGit\php\
EXTEND_PATH
C:\wwwroot\veidingNewGit\php\extend\
VENDOR_PATH
C:\wwwroot\veidingNewGit\php\vendor\
RUNTIME_PATH
C:\wwwroot\veidingNewGit\php\runtime\
LOG_PATH
C:\wwwroot\veidingNewGit\php\runtime\log\
CACHE_PATH
C:\wwwroot\veidingNewGit\php\runtime\cache\
TEMP_PATH
C:\wwwroot\veidingNewGit\php\runtime\temp\
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true