[10501] PDOException in Connection.php line 388

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

  1. $this->PDOStatement->execute();
  2. // 调试结束
  3. $this->debug(false);
  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 388
  2. at Connection->query('SELECT COUNT(*) AS t...', ['where_status_0' => [-1, 1], 'where_status_1' => ['0', 1], 'where_AND_fid_in_1' => ['1', 1]], false, true) in Query.php line 227
  3. at Query->query('SELECT COUNT(*) AS t...', ['where_status_0' => [-1, 1], 'where_status_1' => ['0', 1], 'where_AND_fid_in_1' => ['1', 1]], false, true) in Query.php line 2403
  4. at Query->getPdo() in Query.php line 413
  5. at Query->value('COUNT(*) AS tp_count', 0, true) in Query.php line 519
  6. at Query->count() in Query.php line 1425
  7. at Query->paginate(10, false, ['query' => []]) in Content.php line 176
  8. at Content::getListByMid(1, ['order' => 'view', 'status' => ['>', '0'], 'fid' => ['in', ['1']]], 'list desc,id desc', 10, [], true) in ModuleContent.php line 293
  9. at C->getListData(['order' => 'view', 'status' => ['>', '0'], 'fid' => ['in', ['1']]], 'list desc', 10, [], true) in Content.php line 237
  10. at Content->label_get_list_data('1', 1, '10', 'list', 'desc', ['order' => 'view', 'status' => ['>', '0']]) in Content.php line 201
  11. at Content->label_list_data(['name' => 'pc_house_list_page_l...', 'fid' => '1', 'mid' => 1, ...]) in LabelShow.php line 815
  12. at LabelShow->listpage_label('pc_house_list_page_l...', ['union' => 'title', 'title' => null, 'mid' => 1, ...]) in Label.php line 281
  13. at Label->run_listpage_label('pc_house_list_page_l...', ['union' => 'title', 'title' => null, 'mid' => 1, ...])
  14. at call_user_func_array([object(Label), 'run_listpage_label'], ['pc_house_list_page_l...', ['union' => 'title', 'title' => null, 'mid' => 1, ...]]) in common.php line 77
  15. at fun('label@run_listpage_l...', 'pc_house_list_page_l...', ['union' => 'title', 'title' => null, 'mid' => 1, ...]) in 452a58237125932b70985051c1f40130.php line 803
  16. at include('/www/wwwroot/www.818...') in File.php line 50
  17. at File->read('/www/wwwroot/www.818...', ['auto_tpl_base_layout' => '/www/wwwroot/www.818...', 'admin' => false, 'userdb' => false, ...]) in Template.php line 188
  18. at Template->fetch('/www/wwwroot/www.818...', ['auto_tpl_base_layout' => '/www/wwwroot/www.818...', 'admin' => false, 'userdb' => false, ...], []) in Think.php line 86
  19. at Think->fetch('/www/wwwroot/www.818...', ['auto_tpl_base_layout' => '/www/wwwroot/www.818...', 'admin' => false, 'userdb' => false, ...], []) in View.php line 163
  20. at View->fetch('/www/wwwroot/www.818...', ['admin' => false, 'userdb' => false, 'timestamp' => 1711627675, ...], [], []) in Controller.php line 120
  21. at Controller->fetch('/www/wwwroot/www.818...', ['admin' => false, 'userdb' => false, 'timestamp' => 1711627675, ...], [], []) in Base.php line 266
  22. at Base->fetch('/www/wwwroot/www.818...', ['fid' => '1', 'mid' => 1, 's_info' => ['id' => 1, 'pid' => 0, 'mid' => 1, ...], ...]) in Content.php line 65
  23. at Content->index('1', 0)
  24. at ReflectionMethod->invokeArgs(object(Content), ['1', 0]) in App.php line 348
  25. at App::invokeMethod([object(Content), 'index'], []) in App.php line 612
  26. at App::module(['house', 'content', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 462
  27. at App::exec(['type' => 'module', 'module' => ['house', 'content', 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  28. at App::run() in start.php line 19
  29. at require('/www/wwwroot/www.818...') in index.php line 29

Exception Datas

PDO Error Info
SQLSTATE 42S22
Driver Error Code 1054
Driver Error Message Unknown column 'order' in 'where clause'
Database Status
Error Code 10501
Error Message SQLSTATE[42S22]: Column not found: 1054 Unknown column 'order' in 'where clause'
Error SQL SELECT COUNT(*) AS tp_count FROM `qb_house_content` `A` LEFT JOIN `qb_house_content1` `B` ON `A`.`id`=`B`.`id` WHERE ( `status` <> -1 AND `status` > 0 ) AND `order` = 'view' AND `fid` IN (1) LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database www_818nc_com
hostport 3306
dsn
params []
charset utf8
prefix qb_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
fields_strict false
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
empty
POST Data
empty
Files
empty

Cookies

user_sid
e8e0bb6b38
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/www.818nc.com/index.php
QUERY_STRING
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/index.php/house/content/index/order/view/fid/1.html
DOCUMENT_URI
/index.php/house/content/index/order/view/fid/1.html
DOCUMENT_ROOT
/www/wwwroot/www.818nc.com
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.18.0
REMOTE_ADDR
3.239.119.159
REMOTE_PORT
38456
SERVER_ADDR
172.16.201.104
SERVER_PORT
80
SERVER_NAME
www.818nc.com
REDIRECT_STATUS
200
PATH_INFO
/house/content/index/order/view/fid/1.html
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
818nc.com
PHP_SELF
/index.php/house/content/index/order/view/fid/1.html
REQUEST_TIME_FLOAT
1711627675.671
REQUEST_TIME
1711627675
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.818nc.com/application/
ENTRANCE
index
THINK_VERSION
5.0.18
THINK_START_TIME
1711627675.6717
THINK_START_MEM
260976
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.818nc.com/thinkphp/
LIB_PATH
/www/wwwroot/www.818nc.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.818nc.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.818nc.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.818nc.com/
EXTEND_PATH
/www/wwwroot/www.818nc.com/extend/
VENDOR_PATH
/www/wwwroot/www.818nc.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.818nc.com/runtime/
LOG_PATH
/www/wwwroot/www.818nc.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.818nc.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.818nc.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.818nc.com/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/www/wwwroot/www.818nc.com/vendor/ezyang/htmlpurifier/library
TEMPLATE_PATH
/www/wwwroot/www.818nc.com/template/
IS_POST
false
PUBLIC_URL
/public/
PUBLIC_PATH
/www/wwwroot/www.818nc.com/public/
UPLOAD_URL
/public/uploads/
UPLOAD_PATH
/www/wwwroot/www.818nc.com/public/uploads/
STATIC_URL
/public/static/
STATIC_PATH
/www/wwwroot/www.818nc.com/public/static/
PLUGINS_PATH
/www/wwwroot/www.818nc.com/plugins/
CACHE_DIR
/www/wwwroot/www.818nc.com/runtime/
QUN
商圈
ADMIN_FILENAME
admin.php
LOAD_INDEXBASE
true