[10501] PDOException in Connection.php line 764

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 'index )' at line 1

  1. $this->numRows = $this->PDOStatement->rowCount();
  2. return $this->numRows;
  3. } catch (\PDOException $e) {
  4. if ($this->isBreak($e)) {
  5. return $this->close()->execute($sql, $bind, $query);
  6. }
  7. throw new PDOException($e, $this->config, $this->getLastsql());
  8. } catch (\Throwable $e) {
  9. if ($this->isBreak($e)) {
  10. return $this->close()->execute($sql, $bind, $query);
  11. }
  12. throw $e;
  13. } catch (\Exception $e) {
  14. if ($this->isBreak($e)) {
  15. return $this->close()->execute($sql, $bind, $query);

Call Stack

  1. in Connection.php line 764
  2. at Connection->execute('UPDATE `crh_party` ...', [], object(Query)) in Connection.php line 1157
  3. at Connection->update(object(Query)) in Query.php line 2891
  4. at Query->update(['views' => ['INC', 1]]) in Query.php line 726
  5. at Query->setField('views', ['INC', 1]) in Query.php line 759
  6. at Query->setInc('views') in Party.php line 59
  7. at Party->show('index')
  8. at ReflectionMethod->invokeArgs(object(Party), ['index']) in Container.php line 395
  9. at Container->invokeReflectMethod(object(Party), object(ReflectionMethod), ['index']) in Module.php line 132
  10. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  11. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  12. at Middleware->think\{closure}(object(Request))
  13. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  14. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  15. at Module->exec() in Dispatch.php line 168
  16. at Dispatch->run() in App.php line 432
  17. at App->think\{closure}(object(Request), object(Closure), null)
  18. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  19. at Middleware->think\{closure}(object(Request))
  20. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  21. at Middleware->dispatch(object(Request)) in App.php line 435
  22. at App->run() in index.php line 21

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 'index )' 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 'index )' at line 1
Error SQL
UPDATE `crh_party` SET `views` = `views` + 1 WHERE ( id = index )
Database Config
type
mysql
hostname
localhost
database
zbjt
hostport
dsn
params
[]
charset
utf8
prefix
crh_
debug
true
deploy
0
rw_separate
false
master_num
1
slave_no
read_master
false
fields_strict
true
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
break_match_str
[]

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_REDIRECT_UNIQUE_ID
XtrlGxigOMC427IAuaa10QAAACk
REDIRECT_REDIRECT_PHPRC
/home/zbjtyzpbojwt/others
REDIRECT_REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
XtrlGxigOMC427IAuaa10QAAACk
REDIRECT_PHPRC
/home/zbjtyzpbojwt/others
REDIRECT_HANDLER
php-cgi
REDIRECT_STATUS
200
UNIQUE_ID
XtrlGxigOMC427IAuaa10QAAACk
PHPRC
/home/zbjtyzpbojwt/others
HTTP_X_FORWARDED_FOR
154.215.251.124
HTTP_X_REAL_IP
154.215.251.124
HTTP_HOST
www.zhengbang.com
HTTP_CONNECTION
close
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
<address>Apache Server at www.zhengbang.com Port 80</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.zhengbang.com
SERVER_ADDR
127.0.0.1
SERVER_PORT
80
REMOTE_ADDR
154.215.251.124
DOCUMENT_ROOT
/home/zbjtyzpbojwt/wwwroot
REQUEST_SCHEME
http
CONTEXT_PREFIX
/php-run-as-cgi
CONTEXT_DOCUMENT_ROOT
/usr/php5.6/bin
SERVER_ADMIN
webmaster@zbjt
SCRIPT_FILENAME
/home/zbjtyzpbojwt/wwwroot/public/index.php
REMOTE_PORT
44094
REDIRECT_URL
/public/index.php/party/show/index.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.0
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/public/party/show/index.html
SCRIPT_NAME
/public/index.php
PATH_INFO
/party/show/index.html
PATH_TRANSLATED
/home/zbjtyzpbojwt/wwwroot/party/show/index.html
ORIG_PATH_INFO
/public/index.php/party/show/index.html
ORIG_SCRIPT_NAME
/php-run-as-cgi/php-cgi
ORIG_SCRIPT_FILENAME
/usr/php5.6/bin/php-cgi
ORIG_PATH_TRANSLATED
/home/zbjtyzpbojwt/wwwroot/public/index.php/party/show/index.html
PHP_SELF
/public/index.php/party/show/index.html
REQUEST_TIME_FLOAT
1591403803.6403
REQUEST_TIME
1591403803
Environment Variablesempty
ThinkPHP Constantsempty