[10501] PDOException in Connection.php line 390

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.tid' 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 390
  2. at Connection->query('SELECT COUNT(*) AS t...', [], false, true) in Query.php line 248
  3. at Query->query('SELECT COUNT(*) AS t...', [], false, true) in Query.php line 2423
  4. at Query->getPdo() in Query.php line 434
  5. at Query->value('COUNT(*) AS tp_count', 0, true) in Query.php line 540
  6. at Query->count() in Query.php line 1446
  7. at Query->paginate(30) in Column.php line 216
  8. at Column->index('holiday', '0', '-1', '-1', '-1', '-1', '-1') in Column.php line 137
  9. at Column->holiday('0', '-1', '-1', '-1', '-1', '-1')
  10. at ReflectionMethod->invokeArgs(object(Column), ['0', '-1', '-1', ...]) in App.php line 343
  11. at App::invokeMethod([object(Column), 'holiday'], []) in App.php line 606
  12. at App::module(['index', 'column', 'holiday'], ['app_host' => '', 'app_debug' => true, 'app_trace' => '0', ...], false) in App.php line 456
  13. at App::exec(['type' => 'module', 'module' => ['index', 'column', 'holiday'], '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/www.use...') in index.php line 34

Exception Datas

PDO Error Info
SQLSTATE 42S22
Driver Error Code 1054
Driver Error Message Unknown column 'c.tid' in 'where clause'
Database Status
Error Code 10501
Error Message SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.tid' in 'where clause'
Error SQL SELECT COUNT(*) AS tp_count FROM `dp_cms_document_holiday` `c` LEFT JOIN `dp_admin_attachment` `a` ON `a`.`id`=`c`.`view` LEFT JOIN `dp_cms_document_org` `o` ON `o`.`id`=`c`.`oid` WHERE `c`.`trash` = 0 AND `c`.`status` = 1 AND `c`.`tid` LIKE '%0%' LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database www_usendxly_com
hostport 3306
dsn
params []
charset utf8
prefix dp_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict false
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
HTTP_HOST
www.usendxly.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/holiday/0/-1/-1/-1/-1/-1
REDIRECT_STATUS
200
SERVER_NAME
www.usendxly.com
SERVER_PORT
80
SERVER_ADDR
172.17.241.252
REMOTE_PORT
50526
REMOTE_ADDR
44.201.24.171
SERVER_SOFTWARE
nginx/1.14.2
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www.usendxly.com
DOCUMENT_URI
/public/index.php/holiday/0/-1/-1/-1/-1/-1
REQUEST_URI
/holiday/0/-1/-1/-1/-1/-1
SCRIPT_NAME
/public/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/www.usendxly.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/public/index.php/holiday/0/-1/-1/-1/-1/-1
REQUEST_TIME_FLOAT
1711667225.5377
REQUEST_TIME
1711667225
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.usendxly.com/public/../application/
ADMIN_FILE
admin.php
THINK_VERSION
5.0.21
THINK_START_TIME
1711667225.5382
THINK_START_MEM
409056
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.usendxly.com/thinkphp/
LIB_PATH
/www/wwwroot/www.usendxly.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.usendxly.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.usendxly.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.usendxly.com/
EXTEND_PATH
/www/wwwroot/www.usendxly.com/extend/
VENDOR_PATH
/www/wwwroot/www.usendxly.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.usendxly.com/runtime/
LOG_PATH
/www/wwwroot/www.usendxly.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.usendxly.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.usendxly.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.usendxly.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/www/wwwroot/www.usendxly.com/vendor/ezyang/htmlpurifier/library
PUBLIC_PATH
/public/