[10501] PDOException in Connection.php line 388

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'count' 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`.`id`,`a`....', [], false, false) in Query.php line 225
  3. at Query->query('SELECT `a`.`id`,`a`....', [], false, false) in Query.php line 2318
  4. at Query->select() in Course.php line 119
  5. at Course->courseList()
  6. at ReflectionMethod->invokeArgs(object(Course), []) in App.php line 196
  7. at App::invokeMethod([object(Course), 'courseList'], []) in App.php line 408
  8. at App::module(['web', 'course', 'courseList'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 295
  9. at App::exec(['type' => 'module', 'module' => ['web', 'course', 'courseList'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 123
  10. at App::run() in start.php line 18
  11. at require('/www/wwwroot/aikewan...') in index.php line 26

Exception Datas

PDO Error Info
SQLSTATE 42S22
Driver Error Code 1054
Driver Error Message Unknown column 'count' in 'order clause'
Database Status
Error Code 10501
Error Message SQLSTATE[42S22]: Column not found: 1054 Unknown column 'count' in 'order clause'
Error SQL SELECT `a`.`id`,`a`.`title`,`a`.`image`,`a`.`is_can_buy`,`a`.`learn_count`,`a`.`price`,`a`.`p_price`,`a`.`is_svip_free`,`a`.`is_vip_free`,e.id as teacher_id,e.name as teacher_name,e.title as teacher_title FROM `aq_course` `a` LEFT JOIN `aq_course_category_relation` `b` ON `a`.`id`=`b`.`course_id` LEFT JOIN `aq_course_teacher_relation` `d` ON `d`.`course_id`=a.id and d.create_time=(select max(create_time) from aq_course_teacher_relation where id=d.id) LEFT JOIN `aq_teacher` `e` ON `d`.`teacher_id`=`e`.`id` WHERE `a`.`status` = 1 AND `a`.`is_answer` = 0 GROUP BY a.id ORDER BY `count` desc LIMIT 0,21
Database Config
type mysql
hostname rm-bp16a89mov6415148.mysql.rds.aliyuncs.com
database xue27sem
hostport 3306
dsn
params []
charset utf8
prefix aq_
debug false
deploy 0
rw_separate false
master_num 1
slave_no
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
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/aikewang/prod/Xue.27sem/php/public/index.php
QUERY_STRING
s=/course/courseList/0/sort/all/1
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/course/courseList/0/sort/all/1
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/aikewang/prod/Xue.27sem/php/public
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
https
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.18.0
REMOTE_ADDR
180.101.204.174
REMOTE_PORT
44422
SERVER_ADDR
172.16.8.171
SERVER_PORT
443
SERVER_NAME
aikewang.com
REDIRECT_STATUS
200
PATH_INFO
/course/courseList/0/sort/all/1
HTTP_HOST
www.aikewang.com
HTTP_VIA
cn192.l1, kunlun5.cn192, l2cn3022.l2, cache44.l2cn3022
HTTP_EAGLEEYE_TRACEID
3adad01c17116973672981954e
HTTP_ALI_SWIFT_LOG_HOST
www.aikewang.com
HTTP_ALI_SWIFT_STAT_HOST
level2.www.aikewang.com
HTTP_X_FORWARDED_FOR
3.237.87.69
HTTP_X_CLIENT_SCHEME
https
HTTP_ALI_CDN_REAL_IP
3.237.87.69
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_ALI_CDN_ADAPTIVE_PORTS
443,443
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711697367.441
REQUEST_TIME
1711697367
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/public/../application/
PUBLIC_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/public
HTML_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/public/html
STATIC_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/public/static
FILES_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/public/files
ENV_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/public/../app_env
THINK_VERSION
5.0.10
THINK_START_TIME
1711697367.4415
THINK_START_MEM
267088
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/thinkphp/
LIB_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/thinkphp/library/
CORE_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/
EXTEND_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/extend/
VENDOR_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/vendor/
RUNTIME_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/runtime/
LOG_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/runtime/log/
CACHE_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/runtime/cache/
TEMP_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/runtime/temp/
CONF_PATH
/www/wwwroot/aikewang/prod/Xue.27sem/php/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false