[10501] PDOException in Connection.php line 390

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->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 390
  2. at Connection->query('SELECT * FROM `cmf_p...', [], false, false) in Query.php line 248
  3. at Query->query('SELECT * FROM `cmf_p...', [], false, false) in Query.php line 2476
  4. at Query->select() in ListController.php line 925
  5. at ListController->newstwo('34') in ListController.php line 510
  6. at ListController->index()
  7. at ReflectionMethod->invokeArgs(object(ListController), []) in App.php line 343
  8. at App::invokeMethod([object(ListController), 'index'], []) in App.php line 606
  9. at App::module(['portal', 'list', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], true) in App.php line 456
  10. at App::exec(['type' => 'module', 'module' => ['portal', 'list', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 139
  11. at App::run() in index.php line 43

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 * FROM `cmf_portal_post` WHERE ( id = )
Database Config
type
mysql
hostname
47.89.225.142
database
mcbsendb
hostport
3306
dsn
params
[]
charset
utf8mb4
prefix
cmf_
debug
true
deploy
0
rw_separate
false
master_num
1
slave_no
read_master
false
fields_strict
true
result_type
2
resultset_type
collection
auto_timestamp
false
datetime_format
false
sql_explain
false
builder
query
\think\db\Query
break_reconnect
false
authcode
J51x51k56vahTyNOD5

Environment Variables

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

Server/Request Data

TEMP
/tmp
TMPDIR
/tmp
TMP
/tmp
PATH
/usr/local/bin:/usr/bin:/bin
USER
www
HOME
/home/www
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
en.mcbschina.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
SCRIPT_FILENAME
/data/wwwroot/mcbsen/public/index.php
REDIRECT_STATUS
200
SERVER_NAME
en.mcbschina.com
SERVER_PORT
80
SERVER_ADDR
172.20.183.176
REMOTE_PORT
20003
REMOTE_ADDR
154.220.91.149
SERVER_SOFTWARE
nginx/1.14.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/data/wwwroot/mcbsen/public
DOCUMENT_URI
/index.php
REQUEST_URI
/portal/list/index/id/34.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/portal/list/index/id/34.html
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1596834116.8468
REQUEST_TIME
1596834116
PATH_INFO
/portal/list/index/id/34.html
Environment Variables
empty

ThinkPHP Constants

IP
154.220.91.149
APP_DEBUG
true
CMF_ROOT
/data/wwwroot/mcbsen/public/../
APP_PATH
/data/wwwroot/mcbsen/public/../app/
CMF_PATH
/data/wwwroot/mcbsen/public/../simplewind/cmf/
PLUGINS_PATH
/data/wwwroot/mcbsen/public/plugins/
EXTEND_PATH
/data/wwwroot/mcbsen/public/../simplewind/extend/
VENDOR_PATH
/data/wwwroot/mcbsen/public/../simplewind/vendor/
RUNTIME_PATH
/data/wwwroot/mcbsen/public/../data/runtime/
THINKCMF_VERSION
5.0.180626
THINK_VERSION
5.0.20
THINK_START_TIME
1596834116.8469
THINK_START_MEM
358576
EXT
.php
DS
/
THINK_PATH
/data/wwwroot/mcbsen/simplewind/thinkphp/
LIB_PATH
/data/wwwroot/mcbsen/simplewind/thinkphp/library/
CORE_PATH
/data/wwwroot/mcbsen/simplewind/thinkphp/library/think/
TRAIT_PATH
/data/wwwroot/mcbsen/simplewind/thinkphp/library/traits/
ROOT_PATH
/data/wwwroot/mcbsen/
LOG_PATH
/data/wwwroot/mcbsen/public/../data/runtime/log/
CACHE_PATH
/data/wwwroot/mcbsen/public/../data/runtime/cache/
TEMP_PATH
/data/wwwroot/mcbsen/public/../data/runtime/temp/
CONF_PATH
/data/wwwroot/mcbsen/public/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/data/wwwroot/mcbsen/simplewind/vendor/ezyang/htmlpurifier/library
QINIU_FUNCTIONS_VERSION
7.2.5
0.069858s