[10501] PDOException in Connection.php line 385

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->PDOStatement->execute();
  2. // 调试结束
  3. $this->debug(false, '', $master);
  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 385
  2. at Connection->query('SELECT COUNT(*) AS t...', [], false, true) in Query.php line 255
  3. at Query->query('SELECT COUNT(*) AS t...', [], false, true) in Query.php line 2470
  4. at Query->getPdo() in Query.php line 441
  5. at Query->value('COUNT(*) AS tp_count', 0, true) in Query.php line 576
  6. at Query->aggregate('COUNT', '*', true) in Query.php line 551
  7. at Query->count() in Query.php line 1484
  8. at Query->paginate('10') in 18b6a8476e15ae0e77b6c432001f3440.php line 308
  9. at include('/var/www/html/ISOTA/...') in File.php line 53
  10. at File->read('/var/www/html/ISOTA/...', ['cateTop' => ['id' => 57, 'pid' => 0, 'type' => '1', ...], 'cateNow' => ['id' => 58, 'pid' => 57, 'type' => '2', ...], 'cateId' => 58, ...]) in Template.php line 188
  11. at Template->fetch('/var/www/html/ISOTA/...', ['cateTop' => ['id' => 57, 'pid' => 0, 'type' => '1', ...], 'cateNow' => ['id' => 58, 'pid' => 57, 'type' => '2', ...], 'cateId' => 58, ...], []) in Think.php line 86
  12. at Think->fetch('show', ['cateTop' => ['id' => 57, 'pid' => 0, 'type' => '1', ...], 'cateNow' => ['id' => 58, 'pid' => 57, 'type' => '2', ...], 'cateId' => 58, ...], []) in View.php line 163
  13. at View->fetch('show') in Users.php line 31
  14. at Users->show()
  15. at ReflectionMethod->invokeArgs(object(Users), []) in App.php line 347
  16. at App::invokeMethod([object(Users), 'show'], []) in App.php line 615
  17. at App::module(['index', 'users', 'show'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 461
  18. at App::exec(['type' => 'module', 'module' => ['index', 'users', 'show']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 143
  19. at App::run() in start.php line 19
  20. at require('/var/www/html/ISOTA/...') 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 `ms_credit_rating` WHERE ( `users_users_id`= ) LIMIT 1
Database Config
type mysql
hostname 1.94.45.55
database isotaweb
hostport 3306
dsn
params []
charset utf8
prefix ms_
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 false
sql_explain false
builder
query \think\db\Query
break_reconnect false

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

think
{ "cateLis": { "cateTopId": 57, "cateId": 58, "group": "base" } }

Server/Request Data

REDIRECT_UNIQUE_ID
ZgVfD9q9Khd0aTtNsi-NHwAAAAo
REDIRECT_STATUS
200
UNIQUE_ID
ZgVfD9q9Khd0aTtNsi-NHwAAAAo
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.isota.cn
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2.4.6 (CentOS) PHP/5.6.40 OpenSSL/1.0.2k-fips
SERVER_NAME
www.isota.cn
SERVER_ADDR
192.168.0.36
SERVER_PORT
80
REMOTE_ADDR
3.236.145.110
DOCUMENT_ROOT
/var/www/html/ISOTA/isotaWEB/public
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/var/www/html/ISOTA/isotaWEB/public
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/var/www/html/ISOTA/isotaWEB/public/index.php
REMOTE_PORT
37998
REDIRECT_QUERY_STRING
s=/index/users/show/cate_id/58/id/513.html
REDIRECT_URL
/index/users/show/cate_id/58/id/513.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
s=/index/users/show/cate_id/58/id/513.html
REQUEST_URI
/index/users/show/cate_id/58/id/513.html
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711628047.774
REQUEST_TIME
1711628047
PATH_INFO
/index/users/show/cate_id/58/id/513.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/var/www/html/ISOTA/isotaWEB/public/../application/
PUBLIC_PATH
/var/www/html/ISOTA/isotaWEB/public
THINK_VERSION
5.0.24
THINK_START_TIME
1711628047.7755
THINK_START_MEM
258064
EXT
.php
DS
/
THINK_PATH
/var/www/html/ISOTA/isotaWEB/thinkphp/
LIB_PATH
/var/www/html/ISOTA/isotaWEB/thinkphp/library/
CORE_PATH
/var/www/html/ISOTA/isotaWEB/thinkphp/library/think/
TRAIT_PATH
/var/www/html/ISOTA/isotaWEB/thinkphp/library/traits/
ROOT_PATH
/var/www/html/ISOTA/isotaWEB/
EXTEND_PATH
/var/www/html/ISOTA/isotaWEB/extend/
VENDOR_PATH
/var/www/html/ISOTA/isotaWEB/vendor/
RUNTIME_PATH
/var/www/html/ISOTA/isotaWEB/runtime/
LOG_PATH
/var/www/html/ISOTA/isotaWEB/runtime/log/
CACHE_PATH
/var/www/html/ISOTA/isotaWEB/runtime/cache/
TEMP_PATH
/var/www/html/ISOTA/isotaWEB/runtime/temp/
CONF_PATH
/var/www/html/ISOTA/isotaWEB/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
PHP_INT_MIN
-9223372036854775808
ADDON_PATH
/var/www/html/ISOTA/isotaWEB/addons/