[10501] PDOException in Connection.php line 385

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' 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...', ['where_AND_cate_id_in_1' => ['220', 1]], false, true) in Query.php line 255
  3. at Query->query('SELECT COUNT(*) AS t...', ['where_AND_cate_id_in_1' => ['220', 1]], 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, false, ['query' => ['/wap/message_html' => '', 'id' => '220', 'name' => 'message']]) in Channel.php line 121
  9. at Channel->action('message', '220')
  10. at ReflectionMethod->invokeArgs(object(Channel), ['message', '220']) in App.php line 343
  11. at App::invokeMethod([object(Channel), 'action'], []) in App.php line 611
  12. at App::module(['Wap', 'Channel', 'action'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  13. at App::exec(['type' => 'module', 'module' => ['Wap', 'Channel', 'action'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  14. at App::run() in start.php line 19
  15. at require('/www/wwwroot/shxdsw....') in index.php line 34

Exception Datas

PDO Error Info
SQLSTATE 42S22
Driver Error Code 1054
Driver Error Message Unknown column 'status' in 'where clause'
Database Status
Error Code 10501
Error Message SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'where clause'
Error SQL SELECT COUNT(*) AS tp_count FROM `hsz_message` WHERE `cate_id` IN (220) AND `status` = '1' LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database shxdsw_cn
hostport 3306
dsn
params []
charset utf8
prefix hsz_
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

/wap/message_html
id
220
POST Data
empty
Files
empty

Cookies

PHPSESSID
048tnl19fau9gm9dur35ojria7
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
REDIRECT_STATUS
200
proxy-nokeepalive
1
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_HOST
www.rra-law.com
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip
HTTP_COOKIE
PHPSESSID=048tnl19fau9gm9dur35ojria7
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH
/www/server/apache/lib
SERVER_SIGNATURE
Apache Server at www.rra-law.com Port 80
SERVER_SOFTWARE
Apache
SERVER_NAME
www.rra-law.com
SERVER_ADDR
122.114.109.210
SERVER_PORT
80
REMOTE_ADDR
104.140.12.178
DOCUMENT_ROOT
/www/wwwroot/shxdsw.cn/public
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/shxdsw.cn/public
SERVER_ADMIN
webmaster@example.com
SCRIPT_FILENAME
/www/wwwroot/shxdsw.cn/public/index.php
REMOTE_PORT
50678
REDIRECT_URL
/wap/message.html
REDIRECT_QUERY_STRING
/wap/message.html&id=220
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
/wap/message.html&id=220
REQUEST_URI
//wap/message.html?id=220
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1669502595.5452
REQUEST_TIME
1669502595
PATH_INFO
/wap/message.html
Environment Variables
empty

ThinkPHP Constants

__PUBLIC__
/public
APP_PATH
/www/wwwroot/shxdsw.cn/public/../application/
UPLOAD_PATH
/www/wwwroot/shxdsw.cn/public/../public
RUNTIME_PATH
/www/wwwroot/shxdsw.cn/public/../runtime/
DATA
/www/wwwroot/shxdsw.cn/public/../data/
APP_DEBUG
false
DB_DEBUG
false
THINK_VERSION
5.0.24
THINK_START_TIME
1669502595.546
THINK_START_MEM
271384
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/shxdsw.cn/thinkphp/
LIB_PATH
/www/wwwroot/shxdsw.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/shxdsw.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/shxdsw.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/shxdsw.cn/
PUBLIC_PATH
/www/wwwroot/shxdsw.cn/public/
EXTEND_PATH
/www/wwwroot/shxdsw.cn/extend/
VENDOR_PATH
/www/wwwroot/shxdsw.cn/vendor/
LOG_PATH
/www/wwwroot/shxdsw.cn/public/../runtime/log/
CACHE_PATH
/www/wwwroot/shxdsw.cn/public/../runtime/cache/
TEMP_PATH
/www/wwwroot/shxdsw.cn/public/../runtime/temp/
CONF_PATH
/www/wwwroot/shxdsw.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
QINIU_FUNCTIONS_VERSION
7.1.3
DATA_PATH
../runtime/cache/module/
MAX_MENU_LENGTH
3
MAX_SUB_MENU_LENGTH
5