[10501] PDOException in Connection.php line 385

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, '', $master);
  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 (\Throwable $e) {
  12. if ($this->isBreak($e)) {
  13. return $this->close()->query($sql, $bind, $master, $pdo);
  14. }
  15. throw $e;
  16. } catch (\Exception $e) {
  17. if ($this->isBreak($e)) {
  18. return $this->close()->query($sql, $bind, $master, $pdo);
  19. }

Call Stack

  1. in Connection.php line 385
  2. at Connection->query('SELECT `id`,`name`,`...', [], false, false) in Query.php line 255
  3. at Query->query('SELECT `id`,`name`,`...', [], false, false) in Query.php line 2686
  4. at Query->find() in Common.php line 60
  5. at Common->now_here(null) in News.php line 34
  6. at News->newlist()
  7. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  8. at App::invokeMethod([object(News), 'newlist'], []) in App.php line 611
  9. at App::module(['index', 'news', 'newlist'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  10. at App::exec(['type' => 'module', 'module' => ['index', 'news', 'newlist']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('E:\www\newqcz\thinkp...') in index.php line 18

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`,`name`,`pid` FROM `article_category` WHERE ( id= ) LIMIT 1
Database Config
type
mysql
hostname
182.254.243.135
database
qichezhan
hostport
dsn
params
[]
charset
utf8
prefix
debug
true
deploy
0
rw_separate
false
master_num
1
slave_no
read_master
false
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

/index/news/newlist
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_STATUS
200
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_HOST
www.lyqckyzz.cn
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;
SystemRoot
C:\Windows
COMSPEC
C:\Windows\system32\cmd.exe
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR
C:\Windows
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.5.38
SERVER_NAME
www.lyqckyzz.cn
SERVER_ADDR
192.168.1.169
SERVER_PORT
80
REMOTE_ADDR
103.239.99.4
DOCUMENT_ROOT
E:/www/newqcz/public
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
E:/www/newqcz/public
SERVER_ADMIN
admin@php.cn
SCRIPT_FILENAME
E:/www/newqcz/public/index.php
REMOTE_PORT
20001
REDIRECT_URL
/index/news/newlist
REDIRECT_QUERY_STRING
/index/news/newlist
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
/index/news/newlist
REQUEST_URI
/index/news/newlist
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1600947467.786
REQUEST_TIME
1600947467
PATH_INFO
/index/news/newlist
Environment Variables
empty

ThinkPHP Constants

WXQAUTH
tpl
APP_PATH
E:\www\newqcz\public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1600947467.8019
THINK_START_MEM
162752
EXT
.php
DS
/
THINK_PATH
E:\www\newqcz\thinkphp/
LIB_PATH
E:\www\newqcz\thinkphp/library/
CORE_PATH
E:\www\newqcz\thinkphp/library/think/
TRAIT_PATH
E:\www\newqcz\thinkphp/library/traits/
ROOT_PATH
E:\www\newqcz/
EXTEND_PATH
E:\www\newqcz/extend/
VENDOR_PATH
E:\www\newqcz/vendor/
RUNTIME_PATH
E:\www\newqcz/runtime/
LOG_PATH
E:\www\newqcz/runtime/log/
CACHE_PATH
E:\www\newqcz/runtime/cache/
TEMP_PATH
E:\www\newqcz/runtime/temp/
CONF_PATH
E:\www\newqcz\public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true
aid
1
mid
Resource
PRE_URL
http://www.lyqckyzz.cn