[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 ')' 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 (\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 388
  2. at Connection->query('SELECT `id`,`pid` FR...', [], false, false) in Query.php line 227
  3. at Query->query('SELECT `id`,`pid` FR...', [], false, false) in Query.php line 2455
  4. at Query->select() in Column.php line 194
  5. at Column->breadColumn(null) in Column.php line 181
  6. at Column->getBreadId(null) in Column.php line 162
  7. at Column->getBreadColumn(null) in 2026f70fd0fa7a659ab2b66c1ce1d994.php line 107
  8. at include('/webHome/host0081393...') in File.php line 50
  9. at File->read('/webHome/host0081393...', ['site' => ['logo_img' => '/uploads/image/20180...', 'keywords' => '...', 'description' => '...', ...], 'column' => [['id' => 1, 'name' => '關于我們', 'sub_name' => '', ...], ['id' => 2, 'name' => '南亞産品', 'sub_name' => '', ...], ['id' => 3, 'name' => '環琪産品', 'sub_name' => '', ...], ...], 'column_info' => null, ...]) in Template.php line 188
  10. at Template->fetch('/webHome/host0081393...', ['site' => ['logo_img' => '/uploads/image/20180...', 'keywords' => '...', 'description' => '...', ...], 'column' => [['id' => 1, 'name' => '關于我們', 'sub_name' => '', ...], ['id' => 2, 'name' => '南亞産品', 'sub_name' => '', ...], ['id' => 3, 'name' => '環琪産品', 'sub_name' => '', ...], ...], 'column_info' => null, ...], []) in Think.php line 86
  11. at Think->fetch('/product_list', ['site' => ['logo_img' => '/uploads/image/20180...', 'keywords' => '...', 'description' => '...', ...], 'column' => [['id' => 1, 'name' => '關于我們', 'sub_name' => '', ...], ['id' => 2, 'name' => '南亞産品', 'sub_name' => '', ...], ['id' => 3, 'name' => '環琪産品', 'sub_name' => '', ...], ...], 'column_info' => null, ...], []) in View.php line 163
  12. at View->fetch('/product_list', ['product_list' => [['id' => '83', 'column_id' => '42', 'name' => '...', ...], ['id' => '82', 'column_id' => '42', 'name' => '...', ...], ['id' => '81', 'column_id' => '39', 'name' => '...', ...], ...], 'total' => 60, 'page' => '<div class="page"><s...', ...], []) in View.php line 36
  13. at View->output('/product_list') in Response.php line 309
  14. at Response->getContent() in Response.php line 94
  15. at Response->send() in start.php line 19
  16. at require('/webHome/host0081393...') in index.php line 25

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 `id`,`pid` FROM `thinkcms_column` WHERE ( id= )
Database Config
type mysql
hostname my4314797.xincache1.cn
database my4314797
hostport 3306
dsn
params [ ]
charset utf8
prefix thinkcms_
debug false
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
empty

Server/Request Data

USER
host0081393
HOME
/webHome//host0081393
FCGI_ROLE
RESPONDER
REDIRECT_REDIRECT_STATUS
200
REDIRECT_HANDLER
php-fpm
REDIRECT_STATUS
200
HTTP_HOST
www.juhua844425.cn
HTTP_USER_AGENT
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip,deflate
HTTP_REFERER
http://www.juhua844425.cn/product/
HTTP_CLIENT_IP
59.63.136.82
HTTP_X_FORWARDED_FOR
66.96.125.172
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
www.juhua844425.cn
SERVER_ADDR
120.133.3.38
SERVER_PORT
80
REMOTE_ADDR
154.220.89.106
DOCUMENT_ROOT
/webHome/host0081393/www
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/webHome/host0081393/www/index.php
REMOTE_PORT
64043
REDIRECT_URL
/index.php/product/
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/product/
SCRIPT_NAME
/index.php
PATH_INFO
/product/
PATH_TRANSLATED
/webHome/host0081393/www/product/
ORIG_PATH_INFO
/index.php/product/
ORIG_SCRIPT_NAME
/php5-fcgi/php-fpm-host0081393
ORIG_SCRIPT_FILENAME
/php-1.1/phpfarm-0.1.0/inst/bin/php-fpm-host0081393
ORIG_PATH_TRANSLATED
/webHome/host0081393/www/index.php/product/
PHP_SELF
/index.php/product/
REQUEST_TIME_FLOAT
1571643974.8
REQUEST_TIME
1571643974
argv
[ ]
argc
0

Environment Variables

USER
host0081393
HOME
/webHome//host0081393
FCGI_ROLE
RESPONDER
REDIRECT_REDIRECT_STATUS
200
REDIRECT_HANDLER
php-fpm
REDIRECT_STATUS
200
HTTP_HOST
www.juhua844425.cn
HTTP_USER_AGENT
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip,deflate
HTTP_REFERER
http://www.juhua844425.cn/product/
HTTP_CLIENT_IP
59.63.136.82
HTTP_X_FORWARDED_FOR
66.96.125.172
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
www.juhua844425.cn
SERVER_ADDR
120.133.3.38
SERVER_PORT
80
REMOTE_ADDR
154.220.89.106
DOCUMENT_ROOT
/webHome/host0081393/www
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/webHome/host0081393/www/index.php
REMOTE_PORT
64043
REDIRECT_URL
/index.php/product/
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/product/
SCRIPT_NAME
/index.php
PATH_INFO
/product/
PATH_TRANSLATED
/webHome/host0081393/www/product/
ORIG_PATH_INFO
/index.php/product/
ORIG_SCRIPT_NAME
/php5-fcgi/php-fpm-host0081393
ORIG_SCRIPT_FILENAME
/php-1.1/phpfarm-0.1.0/inst/bin/php-fpm-host0081393
ORIG_PATH_TRANSLATED
/webHome/host0081393/www/index.php/product/
PHP_SELF
/index.php/product/
REQUEST_TIME_FLOAT
1571643974.8
REQUEST_TIME
1571643974
argv
[ ]
argc
0

ThinkPHP Constants

APP_VERSION
5.0.0
SITE_PATH
/webHome/host0081393/www
ADMIN_DIR
INDEX_DIR
BIND_MODULE
index
__INDEX__
/
APP_PATH
/webHome/host0081393/www/apps/
VENDOR_PATH
/webHome/host0081393/www/core/vendor/
EXTEND_PATH
/webHome/host0081393/www/apps/
THINK_VERSION
5.0.18
THINK_START_TIME
1571643974.8
THINK_START_MEM
230880
EXT
.php
DS
/
THINK_PATH
/webHome/host0081393/www/core/thinkphp/
LIB_PATH
/webHome/host0081393/www/core/thinkphp/library/
CORE_PATH
/webHome/host0081393/www/core/thinkphp/library/think/
TRAIT_PATH
/webHome/host0081393/www/core/thinkphp/library/traits/
ROOT_PATH
/webHome/host0081393/www/
RUNTIME_PATH
/webHome/host0081393/www/runtime/
LOG_PATH
/webHome/host0081393/www/runtime/log/
CACHE_PATH
/webHome/host0081393/www/runtime/cache/
TEMP_PATH
/webHome/host0081393/www/runtime/temp/
CONF_PATH
/webHome/host0081393/www/apps/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
IS_WAP
false