[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 jxzbjt_ce0791_co
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
Cookies
PHPSESSID cuq33vrbdtb1t50va75totvnk0
Sessionempty
Server/Request Data
USER www
HOME /home/www
FCGI_ROLE RESPONDER
REDIRECT_STATUS 200
proxy-nokeepalive 1
HTTP_USER_AGENT Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
HTTP_HOST www.zhengbang.com
HTTP_ACCEPT */*
HTTP_COOKIE PHPSESSID=cuq33vrbdtb1t50va75totvnk0
HTTP_ACCEPT_CHARSET utf-8
CONTENT_LENGTH 0
CONTENT_TYPE application/x-www-form-urlencoded
PATH /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
LD_LIBRARY_PATH /www/server/apache/lib
SERVER_SIGNATURE <address>Apache Server at www.zhengbang.com Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME www.zhengbang.com
SERVER_ADDR 211.149.224.47
SERVER_PORT 80
REMOTE_ADDR 45.158.221.134
DOCUMENT_ROOT /www/wwwroot/zbjt/public
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /www/wwwroot/zbjt/public
SERVER_ADMIN webmaster@example.com
SCRIPT_FILENAME /www/wwwroot/zbjt/public/index.php
REMOTE_PORT 32964
REDIRECT_URL /party/show/index.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI //party/show/index.html
SCRIPT_NAME /index.php
PATH_INFO /party/show/index.html
PATH_TRANSLATED redirect:/index.php/party/show/index.html/show/index.html
PHP_SELF /index.php/party/show/index.html
REQUEST_TIME_FLOAT 1604355631.5547
REQUEST_TIME 1604355631
Environment Variablesempty
ThinkPHP Constantsempty
分享到:QQ空间|新浪微博|腾讯微博|人人网|微信