[10501] PDOException in Connection.php line 453

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1

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

Call Stack

  1. in Connection.php line 453
  2. at Connection->execute('UPDATE `tjjc_news` ...', [], object(Query)) in Query.php line 269
  3. at Query->execute('UPDATE `tjjc_news` ...', [], object(Query)) in Query.php line 2437
  4. at Query->update(['hits' => ['inc', 1]]) in Query.php line 642
  5. at Query->setField('hits', ['inc', 1]) in Query.php line 671
  6. at Query->setInc('hits', 1) in News.php line 62
  7. at News->setHits(null) in News.php line 57
  8. at News->news_show()
  9. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  10. at App::invokeMethod([object(News), 'news_show'], []) in App.php line 611
  11. at App::module(['index', 'news', 'news_show'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  12. at App::exec(['type' => 'module', 'module' => ['index', 'news', 'news_show'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  13. at App::run() in start.php line 19
  14. at require('/www/wwwroot/jiechen...') in index.php line 17

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 MariaDB 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 MariaDB server version for the right syntax to use near ')' at line 1
Error SQL UPDATE `tjjc_news` SET `hits`=`hits`+1 WHERE ( id= )
Database Config
type mysql
hostname localhost
database jiecheng_weetop_
hostport
dsn
params []
charset utf8
prefix tjjc_
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

article_id
493
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_REFERER
http://www.siguoqi.com/Detail.html?article_id=493
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.siguoqi.com
PATH_INFO
//Detail.html
REDIRECT_STATUS
200
SERVER_NAME
www.siguoqi.com
SERVER_PORT
443
SERVER_ADDR
172.16.3.85
REMOTE_PORT
39296
REMOTE_ADDR
34.228.168.200
SERVER_SOFTWARE
nginx/1.14.2
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/jiecheng.weetop.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/Detail.html?article_id=493
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=//Detail.html&article_id=493
SCRIPT_FILENAME
/www/wwwroot/jiecheng.weetop.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711622849.9719
REQUEST_TIME
1711622849
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/jiecheng.weetop.com/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711622849.9722
THINK_START_MEM
408384
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/jiecheng.weetop.com/thinkphp/
LIB_PATH
/www/wwwroot/jiecheng.weetop.com/thinkphp/library/
CORE_PATH
/www/wwwroot/jiecheng.weetop.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/jiecheng.weetop.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/jiecheng.weetop.com/
EXTEND_PATH
/www/wwwroot/jiecheng.weetop.com/extend/
VENDOR_PATH
/www/wwwroot/jiecheng.weetop.com/vendor/
RUNTIME_PATH
/www/wwwroot/jiecheng.weetop.com/runtime/
LOG_PATH
/www/wwwroot/jiecheng.weetop.com/runtime/log/
CACHE_PATH
/www/wwwroot/jiecheng.weetop.com/runtime/cache/
TEMP_PATH
/www/wwwroot/jiecheng.weetop.com/runtime/temp/
CONF_PATH
/www/wwwroot/jiecheng.weetop.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
UPLOADS_PATH
/frametp/public/uploads/