[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 lang = 1 ) ORDER BY sort ASC,id DESC LIMIT 100' 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 * FROM `xy_ca...', [], false, false) in Query.php line 227
  3. at Query->query('SELECT * FROM `xy_ca...', [], false, false) in Query.php line 2320
  4. at Query->select() in ee10910fc9b46daaf7051731c5b382fc.php line 113
  5. at include('D:\wwwroot\jianhuacd...') in File.php line 50
  6. at File->read('D:\wwwroot\jianhuacd...', ['seo_title' => null, 'seo_keyword' => '...', 'seo_introduction' => '...', ...]) in Template.php line 197
  7. at Template->fetch('D:\wwwroot\jianhuacd...', ['seo_title' => null, 'seo_keyword' => '...', 'seo_introduction' => '...', ...], []) in Think.php line 84
  8. at Think->fetch('D:\wwwroot\jianhuacd...', ['seo_title' => null, 'seo_keyword' => '...', 'seo_introduction' => '...', ...], []) in View.php line 159
  9. at View->fetch('D:\wwwroot\jianhuacd...', ['seo_title' => null, 'seo_keyword' => '...', 'seo_introduction' => '...', ...], [], []) in Controller.php line 112
  10. at Controller->fetch('D:\wwwroot\jianhuacd...') in Article.php line 140
  11. at Article->articleList(['list', '4', '4']) in Article.php line 42
  12. at Article->index('')
  13. at ReflectionMethod->invokeArgs(object(Article), ['']) in App.php line 197
  14. at App::invokeMethod([object(Article), 'index'], []) in App.php line 414
  15. at App::module(['index', 'Article', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 296
  16. at App::exec(['type' => 'module', 'module' => ['index', 'Article', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 124
  17. at App::run() in start.php line 18
  18. at require('D:\wwwroot\jianhuacd...') in index.php line 49

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 lang = 1 ) ORDER BY sort ASC,id DESC LIMIT 100' 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 lang = 1 ) ORDER BY sort ASC,id DESC LIMIT 100' at line 1
Error SQL SELECT * FROM `xy_category` WHERE ( is_show = 1 and parent_id = and lang = 1 ) ORDER BY sort ASC,id DESC LIMIT 100
Database Config
type mysql
hostname localhost
database jianhuacd
hostport 3306
dsn
params []
charset utf8
prefix xy_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
fields_strict false
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

index_lang_id
1
index_lang_name
CN
index_lang_template
default

Server/Request Data

_FCGI_X_PIPE_
\\.\pipe\IISFCGI-a2a57bba-1137-4640-bd1f-0dbb8eb2273d
PHP_FCGI_MAX_REQUESTS
1000
PHPRC
C:\php_70
ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_CONFIG
C:\inetpub\temp\apppools\jianhuacd\jianhuacd.config
APP_POOL_ID
jianhuacd
CommonProgramFiles
C:\Program Files (x86)\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
EBS-8036
ComSpec
C:\Windows\system32\cmd.exe
DriverData
C:\Windows\System32\Drivers\DriverData
LOCALAPPDATA
C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS
12
OS
Windows_NT
Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\php_52;D:\mysql\bin;c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE
x86
PROCESSOR_ARCHITEW6432
AMD64
PROCESSOR_IDENTIFIER
Intel64 Family 6 Model 85 Stepping 4, GenuineIntel
PROCESSOR_LEVEL
6
PROCESSOR_REVISION
5504
ProgramData
C:\ProgramData
ProgramFiles
C:\Program Files (x86)
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
EBS-8036$
USERPROFILE
C:\Windows\system32\config\systemprofile
windir
C:\Windows
ORIG_PATH_INFO
/index.php/xwzx/list_4_4.html
URL
/index.php
SERVER_SOFTWARE
Microsoft-IIS/10.0
SERVER_PROTOCOL
HTTP/1.1
SERVER_PORT_SECURE
0
SERVER_PORT
80
SERVER_NAME
www.wxjhcd.com
SCRIPT_NAME
/index.php
SCRIPT_FILENAME
D:\wwwroot\jianhuacd\wwwroot\index.php
REQUEST_URI
/xwzx/list_4_4.html
REQUEST_METHOD
GET
REMOTE_USER
REMOTE_PORT
59268
REMOTE_HOST
127.0.0.1
REMOTE_ADDR
127.0.0.1
QUERY_STRING
PATH_TRANSLATED
D:\wwwroot\jianhuacd\wwwroot\index.php\xwzx\list_4_4.html
PATH_INFO
/xwzx/list_4_4.html
LOGON_USER
LOCAL_ADDR
127.0.0.1
INSTANCE_META_PATH
/LM/W3SVC/11390
INSTANCE_NAME
JIANHUACD
INSTANCE_ID
11390
HTTPS_SERVER_SUBJECT
HTTPS_SERVER_ISSUER
HTTPS_SECRETKEYSIZE
HTTPS_KEYSIZE
HTTPS
off
GATEWAY_INTERFACE
CGI/1.1
DOCUMENT_ROOT
D:\wwwroot\jianhuacd\wwwroot
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\jianhuacd\wwwroot\
APPL_MD_PATH
/LM/W3SVC/11390/ROOT
IIS_UrlRewriteModule
7,1,1993,2336
WEBSOCKET_VERSION
13
UNENCODED_URL
/xwzx/list_4_4.html
IIS_WasUrlRewritten
1
HTTP_X_ORIGINAL_URL
/xwzx/list_4_4.html
HTTP_X_REAL_IP
44.201.59.20
HTTP_X_FORWARDED_FOR
44.201.59.20
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.wxjhcd.com
HTTP_ACCEPT
*/*
HTTP_CONTENT_LENGTH
0
HTTP_CONNECTION
close
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/xwzx/list_4_4.html
REQUEST_TIME_FLOAT
1711689552.9388
REQUEST_TIME
1711689552
Environment Variables
empty

ThinkPHP Constants

APP_PATH
D:\wwwroot\jianhuacd\wwwroot/application/
BIND_MODULE
index
THINK_VERSION
5.0.11
THINK_START_TIME
1711689552.9417
THINK_START_MEM
368928
EXT
.php
DS
\
THINK_PATH
D:\wwwroot\jianhuacd\wwwroot\tp123\
LIB_PATH
D:\wwwroot\jianhuacd\wwwroot\tp123\library\
CORE_PATH
D:\wwwroot\jianhuacd\wwwroot\tp123\library\think\
TRAIT_PATH
D:\wwwroot\jianhuacd\wwwroot\tp123\library\traits\
ROOT_PATH
D:\wwwroot\jianhuacd\wwwroot\
EXTEND_PATH
D:\wwwroot\jianhuacd\wwwroot\extend\
VENDOR_PATH
D:\wwwroot\jianhuacd\wwwroot\vendor\
RUNTIME_PATH
D:\wwwroot\jianhuacd\wwwroot\runtime\
LOG_PATH
D:\wwwroot\jianhuacd\wwwroot\runtime\log\
CACHE_PATH
D:\wwwroot\jianhuacd\wwwroot\runtime\cache\
TEMP_PATH
D:\wwwroot\jianhuacd\wwwroot\runtime\temp\
CONF_PATH
D:\wwwroot\jianhuacd\wwwroot/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true