[10501] PDOException in Connection.php line 385

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'category_id' in 'where clause'

  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(12) in Cases.php line 17
  9. at Cases->index(object(Request))
  10. at ReflectionMethod->invokeArgs(object(Cases), [object(Request)]) in App.php line 343
  11. at App::invokeMethod([object(Cases), 'index'], []) in App.php line 611
  12. at App::module(['index', 'cases', null], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '', ...], true) in App.php line 456
  13. at App::exec(['type' => 'module', 'module' => ['index', 'cases', null]], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '', ...]) in App.php line 139
  14. at App::run() in start.php line 19
  15. at require('/www/wwwroot/topwms....') in index.php line 24

Exception Datas

PDO Error Info
SQLSTATE 42S22
Driver Error Code 1054
Driver Error Message Unknown column 'category_id' in 'where clause'
Database Status
Error Code 10501
Error Message SQLSTATE[42S22]: Column not found: 1054 Unknown column 'category_id' in 'where clause'
Error SQL SELECT COUNT(*) AS tp_count FROM `fa_cases` WHERE `category_id` = '14.html' LIMIT 1
Database Config
type mysql
hostname 47.106.210.180
database topwms_cn
hostport 3306
dsn
params []
charset utf8
prefix fa_
debug 1
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

categoryId
14.html
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
PHP_APP_DEBUG
1
PHP_APP_TRACE
PHP_DATABASE_DEBUG
1
PHP_DATABASE_HOSTNAME
47.106.210.180
PHP_DATABASE_DATABASE
topwms_cn
PHP_DATABASE_USERNAME
topwms_cn
PHP_DATABASE_PASSWORD
Qjap3DjDQAt24WFt
PHP_DATABASE_HOSTPORT
3306
PHP_DATABASE_PREFIX
fa_
SCRIPT_NAME
/index.php
REQUEST_URI
/cases?categoryId=14.html
QUERY_STRING
categoryId=14.html
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
categoryId=14.html
REDIRECT_URL
/cases
REMOTE_PORT
43222
SCRIPT_FILENAME
/www/wwwroot/topwms.cn/public/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/topwms.cn/public
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/www/wwwroot/topwms.cn/public
REMOTE_ADDR
54.227.104.229
SERVER_PORT
80
SERVER_ADDR
172.18.146.15
SERVER_NAME
wisen.com.cn
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at wisen.com.cn Port 80</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_HOST
wisen.com.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
proxy-nokeepalive
1
HTACCESS
on
REDIRECT_STATUS
200
REDIRECT_HTACCESS
on
REDIRECT_PATH_INFO
cases
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711626598.9143
REQUEST_TIME
1711626598
PATH_INFO
cases
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/topwms.cn/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711626598.9148
THINK_START_MEM
367752
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/topwms.cn/thinkphp/
LIB_PATH
/www/wwwroot/topwms.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/topwms.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/topwms.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/topwms.cn/
EXTEND_PATH
/www/wwwroot/topwms.cn/extend/
VENDOR_PATH
/www/wwwroot/topwms.cn/vendor/
RUNTIME_PATH
/www/wwwroot/topwms.cn/runtime/
LOG_PATH
/www/wwwroot/topwms.cn/runtime/log/
CACHE_PATH
/www/wwwroot/topwms.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/topwms.cn/runtime/temp/
CONF_PATH
/www/wwwroot/topwms.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/www/wwwroot/topwms.cn/addons/