[10501] PDOException in Connection.php line 675

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

  1. $this->debug(false);
  2. // 返回结果集
  3. return $this->getResult($pdo, $procedure);
  4. } catch (\PDOException $e) {
  5. if ($this->isBreak($e)) {
  6. return $this->close()->query($sql, $bind, $master, $pdo);
  7. }
  8. throw new PDOException($e, $this->config, $this->getLastsql());
  9. } catch (\Throwable $e) {
  10. if ($this->isBreak($e)) {
  11. return $this->close()->query($sql, $bind, $master, $pdo);
  12. }
  13. throw $e;
  14. } catch (\Exception $e) {
  15. if ($this->isBreak($e)) {
  16. return $this->close()->query($sql, $bind, $master, $pdo);

Call Stack

  1. in Connection.php line 675
  2. at Connection->query('SELECT COUNT(*) AS t...', [], false, true) in Connection.php line 1273
  3. at Connection->value(object(Query), ['COUNT(*) AS tp_count'], 0) in Connection.php line 1303
  4. at Connection->aggregate(object(Query), 'COUNT', 'COUNT(*) AS tp_count') in Query.php line 570
  5. at Query->aggregate('COUNT', '*', true) in Query.php line 603
  6. at Query->count() in Detail.php line 47
  7. at Detail->index('industry', '487')
  8. at ReflectionMethod->invokeArgs(object(Detail), ['industry', '487']) in Container.php line 214
  9. at Container->invokeMethod([object(Detail), 'index'], ['dirs' => 'industry', 'id' => '487']) in Module.php line 124
  10. at Module->run() in App.php line 362
  11. at App->run() in index.php line 24

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 ') LIMIT 1' 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 ') LIMIT 1' at line 1
Error SQL SELECT COUNT(*) AS tp_count FROM `at_arc_comment` WHERE ( `aid` = ) LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database actif
hostport 3306
dsn
params []
charset utf8
prefix at_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
fields_strict true
resultset_type array
auto_timestamp true
datetime_format Y-m-d H:i:s
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_STATUS 200
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
HTTP_HOST news.actifchina.net
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
SERVER_SIGNATURE <address>Apache Server at news.actifchina.net Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME news.actifchina.net
SERVER_ADDR 172.18.69.253
SERVER_PORT 80
REMOTE_ADDR 3.237.235.148
DOCUMENT_ROOT /home/www/actifchina/public
SERVER_ADMIN 4121225@qq.com
SCRIPT_FILENAME /home/www/actifchina/public/index.php
REMOTE_PORT 49352
REDIRECT_URL /detail/industry/487.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /detail/industry/487.html
SCRIPT_NAME /index.php
PATH_INFO /detail/industry/487.html
PATH_TRANSLATED redirect:/index.php/detail/industry/487.html/industry/487.html
PHP_SELF /index.php/detail/industry/487.html
REQUEST_TIME_FLOAT 1711687033.487
REQUEST_TIME 1711687033
Environment Variablesempty
ThinkPHP Constants
WEB_PATH /home/www/actifchina/public
EXTEND_PATH ../extend/
MID Resource
ISPJAX false
MODULE_NAME index
CONTROLLER_NAME Detail
ACTION_NAME index