[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 ') 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 `id` FROM `ja...', [], false, true) in Query.php line 225
  3. at Query->query('SELECT `id` FROM `ja...', [], false, true) in Query.php line 2265
  4. at Query->getPdo() in Query.php line 411
  5. at Query->value('id') in BeersController.php line 111
  6. at BeersController->classroom()
  7. at ReflectionMethod->invokeArgs(object(BeersController), []) in App.php line 196
  8. at App::invokeMethod([object(BeersController), 'classroom'], []) in App.php line 408
  9. at App::module(['home', 'beers', 'classroom'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 295
  10. at App::exec(['type' => 'module', 'module' => ['home', 'beers', 'classroom']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 123
  11. at App::run() in start.php line 18
  12. at require('C:\nptwww\thinkphp\s...') in index.php line 16

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 ') 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 ') LIMIT 1' at line 1
Error SQL SELECT `id` FROM `jay_beerteach` WHERE ( `status` = 1 and sort < ) LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database npt
hostport
dsn
params []
charset utf8
prefix jay_
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

think
{ "lang": "zh-cn" }

Server/Request Data

_FCGI_X_PIPE_
\\.\pipe\IISFCGI-ef293d31-944f-47c6-862c-b5b85cc3bc7d
ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Windows\system32\config\systemprofile\AppData\Roaming
APP_POOL_CONFIG
C:\inetpub\temp\apppools\nptwww\nptwww.config
APP_POOL_ID
nptwww
CommonProgramFiles
C:\Program Files\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
iZ0xx5epr6regfZ
ComSpec
C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK
NO
LOCALAPPDATA
C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS
1
OS
Windows_NT
Path
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;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 85 Stepping 4, GenuineIntel
PROCESSOR_LEVEL
6
PROCESSOR_REVISION
5504
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
iZ0xx5epr6regfZ$
USERPROFILE
C:\Windows\system32\config\systemprofile
windir
C:\Windows
windows_tracing_flags
3
windows_tracing_logfile
C:\BVTBin\Tests\installpackage\csilogfile.log
ORIG_PATH_INFO
/index.php/home/beers/classroom.html
URL
/index.php
SERVER_SOFTWARE
Microsoft-IIS/7.5
SERVER_PROTOCOL
HTTP/1.1
SERVER_PORT_SECURE
0
SERVER_PORT
80
SERVER_NAME
nbcraftbrewing.com
SCRIPT_NAME
/index.php
SCRIPT_FILENAME
C:\nptwww\index.php
REQUEST_URI
/home/beers/classroom.html
REQUEST_METHOD
GET
REMOTE_USER
REMOTE_PORT
55208
REMOTE_HOST
34.236.152.203
REMOTE_ADDR
34.236.152.203
QUERY_STRING
PATH_TRANSLATED
C:\nptwww\index.php\home\beers\classroom.html
PATH_INFO
/home/beers/classroom.html
LOGON_USER
LOCAL_ADDR
172.16.153.68
INSTANCE_META_PATH
/LM/W3SVC/1
INSTANCE_NAME
NPTWWW
INSTANCE_ID
1
HTTPS_SERVER_SUBJECT
HTTPS_SERVER_ISSUER
HTTPS_SECRETKEYSIZE
HTTPS_KEYSIZE
HTTPS
off
GATEWAY_INTERFACE
CGI/1.1
DOCUMENT_ROOT
C:\nptwww
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:\nptwww\
APPL_MD_PATH
/LM/W3SVC/1/ROOT
IIS_UrlRewriteModule
7.1.0871.0
UNENCODED_URL
/home/beers/classroom.html
IIS_WasUrlRewritten
1
HTTP_X_ORIGINAL_URL
/home/beers/classroom.html
HTTP_USER_AGENT
claudebot
HTTP_HOST
nbcraftbrewing.com
HTTP_ACCEPT
*/*
HTTP_CONTENT_LENGTH
0
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php/home/beers/classroom.html
REQUEST_TIME_FLOAT
1710837753.3352
REQUEST_TIME
1710837753
Environment Variables
empty

ThinkPHP Constants

APP_PATH
C:\nptwww/application/
CONF_PATH
C:\nptwww/config/
UPLOADS_PATH
C:\nptwww/uploads/
THINK_VERSION
5.0.10
THINK_START_TIME
1710837753.3352
THINK_START_MEM
282912
EXT
.php
DS
\
THINK_PATH
C:\nptwww\thinkphp\
LIB_PATH
C:\nptwww\thinkphp\library\
CORE_PATH
C:\nptwww\thinkphp\library\think\
TRAIT_PATH
C:\nptwww\thinkphp\library\traits\
ROOT_PATH
C:\nptwww\
EXTEND_PATH
C:\nptwww\extend\
VENDOR_PATH
C:\nptwww\vendor\
RUNTIME_PATH
C:\nptwww\runtime\
LOG_PATH
C:\nptwww\runtime\log\
CACHE_PATH
C:\nptwww\runtime\cache\
TEMP_PATH
C:\nptwww\runtime\temp\
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true
WX_HTTPADDR
http://test.xieenjie.com/
WX_VIEWURL
article/info
WX_APPID
wxbc44596fe585c61a
WX_APPSECRET
dac5a0433e866ee86e02c3196f2da9a1