[10501] PDOException in Connection.php line 388

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a.create_time' in 'order 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 (\Exception $e) {
  12. if ($this->isBreak($e)) {
  13. return $this->close()->query($sql, $bind, $master, $pdo);
  14. }
  15. throw $e;
  16. }
  17. }
  18. /**

Call Stack

  1. in Connection.php line 388
  2. at Connection->query('SELECT `a`.*,`m`.`ni...', [], false, false) in Query.php line 225
  3. at Query->query('SELECT `a`.*,`m`.`ni...', [], false, false) in Query.php line 2318
  4. at Query->select() in Query.php line 1340
  5. at Query->paginate('10', false, ['type' => 'bootstrap', 'var_page' => 'page', 'list_rows' => 15, ...]) in ModelBase.php line 215
  6. at ModelBase->getResultData('10', null) in ModelBase.php line 194
  7. at ModelBase->getList(['a.status' => ['neq', -1]], 'a.*,m.nickname,c.nam...', 'a.create_time desc', '10', [['ob_member m', 'a.member_id = m.id'], ['ob_article_category ...', 'a.category_id = c.id']]) in Article.php line 59
  8. at Article->getArticleList(['a.status' => ['neq', -1]], 'a.*,m.nickname,c.nam...', 'a.create_time desc') in Fuwu.php line 28
  9. at Fuwu->index(0)
  10. at ReflectionMethod->invokeArgs(object(Fuwu), [0]) in App.php line 196
  11. at App::invokeMethod([object(Fuwu), 'index'], []) in App.php line 412
  12. at App::module(['index', 'fuwu', null], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], true) in App.php line 295
  13. at App::exec(['type' => 'module', 'module' => ['index', 'fuwu', null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 123
  14. at App::run() in start.php line 18
  15. at require('/www/wwwroot/xytzg.n...') in index.php line 29

Exception Datas

PDO Error Info
SQLSTATE
42S22
Driver Error Code
1054
Driver Error Message
Unknown column 'a.create_time' in 'order clause'
Database Status
Error Code
10501
Error Message
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a.create_time' in 'order clause'
Error SQL
SELECT `a`.*,`m`.`nickname`,c.name as category_name FROM `ob_article` `a` INNER JOIN `ob_member` `m` ON `a`.`member_id`=`m`.`id` INNER JOIN `ob_article_category` `c` ON `a`.`category_id`=`c`.`id` WHERE `a`.`status` <> -1 ORDER BY a.create_time desc LIMIT 0,10
Database Config
type
mysql
hostname
localhost
database
xytzg_net
hostport
3306
dsn
params
[]
charset
utf8
prefix
ob_
debug
true
deploy
0
rw_separate
false
master_num
1
slave_no
fields_strict
true
result_type
2
resultset_type
array
auto_timestamp
true
datetime_format
Y-m-d H:i:s
sql_explain
true
builder
query
\think\db\Query
break_reconnect
false
sys_data_key
yehH96vG|;+"KTOILaV4B_{z)<C>MupPR~?(=JWk

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
SCRIPT_NAME
/index.php
REQUEST_URI
/index/fuwu.html
QUERY_STRING
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_URL
/index/fuwu.html
REMOTE_PORT
20000
SCRIPT_FILENAME
/www/wwwroot/xytzg.net/public/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/xytzg.net/public
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/www/wwwroot/xytzg.net/public
REMOTE_ADDR
154.194.82.98
SERVER_PORT
80
SERVER_ADDR
172.16.60.246
SERVER_NAME
www.xytzg.net
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at www.xytzg.net Port 80</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.xytzg.net
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
proxy-nokeepalive
1
REDIRECT_STATUS
200
REDIRECT_PATH_INFO
index/fuwu.html
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1576332100.2969
REQUEST_TIME
1576332100
PATH_INFO
index/fuwu.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/xytzg.net/public/../app/
THINK_VERSION
5.0.10
THINK_START_TIME
1576332100.2974
THINK_START_MEM
381568
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/xytzg.net/thinkphp/
LIB_PATH
/www/wwwroot/xytzg.net/thinkphp/library/
CORE_PATH
/www/wwwroot/xytzg.net/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/xytzg.net/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/xytzg.net/
EXTEND_PATH
/www/wwwroot/xytzg.net/extend/
VENDOR_PATH
/www/wwwroot/xytzg.net/vendor/
RUNTIME_PATH
/www/wwwroot/xytzg.net/runtime/
LOG_PATH
/www/wwwroot/xytzg.net/runtime/log/
CACHE_PATH
/www/wwwroot/xytzg.net/runtime/cache/
TEMP_PATH
/www/wwwroot/xytzg.net/runtime/temp/
CONF_PATH
/www/wwwroot/xytzg.net/public/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
QINIU_FUNCTIONS_VERSION
7.1.3
BEHAVIOR_PATH
app\common\behavior\
LAYER_LOGIC_NAME
logic
LAYER_MODEL_NAME
model
LAYER_SERVICE_NAME
service
LAYER_CONTROLLER_NAME
controller
LAYER_VALIDATE_NAME
validate
LAYER_VIEW_NAME
view
RESULT_SUCCESS
success
RESULT_ERROR
error
RESULT_REDIRECT
redirect
RESULT_MESSAGE
message
RESULT_URL
url
RESULT_DATA
data
DATA_STATUS_NAME
status
DATA_NORMAL
1
DATA_DISABLE
0
DATA_DELETE
-1
DATA_SUCCESS
1
DATA_ERROR
0
TIME_CT_NAME
create_time
TIME_UT_NAME
update_time
TIME_NOW
1576332100
SYS_APP_NAMESPACE
app
SYS_HOOK_DIR_NAME
hook
SYS_ADDON_DIR_NAME
addon
SYS_DRIVER_DIR_NAME
driver
SYS_COMMON_DIR_NAME
common
SYS_STATIC_DIR_NAME
static
SYS_VERSION
1.3.0
SYS_ADMINISTRATOR_ID
1
SYS_DS_PROS
/
SYS_DS_CONS
\
SYS_DB_PREFIX
ob_
SYS_ENCRYPT_KEY
yehH96vG|;+"KTOILaV4B_{z)<C>MupPR~?(=JWk
PATH_ADDON
/www/wwwroot/xytzg.net/addon/
PATH_PUBLIC
/www/wwwroot/xytzg.net/public/
PATH_XYT_INDEX
/www/wwwroot/xytzg.net/app/index/
PATH_UPLOAD
/www/wwwroot/xytzg.net/public/upload/
PATH_PICTURE
/www/wwwroot/xytzg.net/public/upload/picture/
PATH_FILE
/www/wwwroot/xytzg.net/public/upload/file/
PATH_SERVICE
/www/wwwroot/xytzg.net//app/common/service/
PATH_COMMON_LOGIC
app\common\logic\
API_CODE_NAME
code
API_MSG_NAME
msg
DB_LIST_ROWS
10
API_KEY
l2V|gfZp{8`;jzR~6Y1_
JWT_KEY
l2V|DSFXXXgfZp{8`;FjzR~6Y1_
STATIC_DOMAIN
Resource
IS_POST
false
IS_GET
true
IS_AJAX
false
IS_PJAX
false
IS_MOBILE
false
MODULE_NAME
index
CONTROLLER_NAME
fuwu
ACTION_NAME
index
URL
fuwu/index
URL_MODULE
index/fuwu/index
URL_TRUE
http://www.xytzg.net/index/fuwu.html
DOMAIN
http://www.xytzg.net
URL_ROOT
0.037867s