[42S02] PDOException in Mysql.php line 60

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hbhdxf.txht_category' doesn't exist

  1. {
  2. $this->initConnect(true);
  3. list($tableName) = explode(' ', $tableName);
  4. if (strpos($tableName, '.')) {
  5. $tableName = str_replace('.', '`.`', $tableName);
  6. }
  7. $sql = 'SHOW COLUMNS FROM `' . $tableName . '`';
  8. // 调试开始
  9. $this->debug(true);
  10. $pdo = $this->linkID->query($sql);
  11. // 调试结束
  12. $this->debug(false, $sql);
  13. $result = $pdo->fetchAll(PDO::FETCH_ASSOC);
  14. $info = [];
  15. if ($result) {
  16. foreach ($result as $key => $val) {
  17. $val = array_change_key_case($val);
  18. $info[$val['field']] = [
  19. 'name' => $val['field'],

Call Stack

  1. in Mysql.php line 60
  2. at PDO->query('SHOW COLUMNS FROM `t...') in Mysql.php line 60
  3. at Mysql->getFields('txht_category') in Query.php line 1378
  4. at Query->getTableInfo('txht_category', 'type') in Query.php line 1425
  5. at Query->getFieldsType(['where' => ['AND' => ['id' => 31, 'status' => 1]], 'table' => 'txht_category', 'field' => '*', ...]) in Query.php line 1431
  6. at Query->getFieldsBind(['where' => ['AND' => ['id' => 31, 'status' => 1]], 'table' => 'txht_category', 'field' => '*', ...]) in Builder.php line 225
  7. at Builder->buildWhere(['AND' => ['id' => 31, 'status' => 1]], ['where' => ['AND' => ['id' => 31, 'status' => 1]], 'table' => 'txht_category', 'field' => '*', ...]) in Builder.php line 203
  8. at Builder->parseWhere(['AND' => ['id' => 31, 'status' => 1]], ['where' => ['AND' => ['id' => 31, 'status' => 1]], 'table' => 'txht_category', 'field' => '*', ...]) in Builder.php line 576
  9. at Builder->select(['where' => ['AND' => ['id' => 31, 'status' => 1]], 'table' => 'txht_category', 'field' => '*', ...]) in Query.php line 1968
  10. at Query->find() in helper.php line 105
  11. at get_info('category', ['id' => 31, 'status' => 1]) in Index.php line 106
  12. at Index->content()
  13. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 226
  14. at App::invokeMethod([object(Index), 'content']) in App.php line 359
  15. at App::module(['index', 'index', 'content'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 134
  16. at App::run() in start.php line 18
  17. at require('C:\WWW\hbhdxf\thinkp...') in index.php line 17

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;;C:\Program Files\python;C:\Program Files\python\Scripts;;C:\BtSoft\panel\script;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
SYSTEMROOT
C:\Windows
COMSPEC
C:\Windows\system32\cmd.exe
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR
C:\Windows
_FCGI_SHUTDOWN_EVENT_
5928
HTTP_CONNECTION
close
SCRIPT_NAME
/index.php
REQUEST_URI
/index/index/content/id/24/pid/31.html
QUERY_STRING
s=/index/index/content/id/24/pid/31.html
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
s=/index/index/content/id/24/pid/31.html
REDIRECT_URL
/index/index/content/id/24/pid/31.html
REMOTE_PORT
20000
SCRIPT_FILENAME
C:/WWW/hbhdxf/public/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
C:/WWW/hbhdxf/public
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
C:/WWW/hbhdxf/public
REMOTE_ADDR
154.210.69.113
SERVER_PORT
80
SERVER_ADDR
172.31.114.219
SERVER_NAME
www.hbhdxf.cn
SERVER_SOFTWARE
Apache/2.4.46 (Win32) OpenSSL/1.1.1g mod_fcgid/2.3.9a
SERVER_SIGNATURE
SystemRoot
C:\Windows
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.hbhdxf.cn
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
REDIRECT_STATUS
200
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1628175985.7547
REQUEST_TIME
1628175985
PATH_INFO
/index/index/content/id/24/pid/31.html
Environment Variablesempty
ThinkPHP Constants
APP_PATH
C:\WWW\hbhdxf\public/../application/
THINK_VERSION
5.0.0
THINK_START_TIME
1628175985.7556
THINK_START_MEM
366864
EXT
.php
DS
\
THINK_PATH
C:\WWW\hbhdxf\thinkphp\
LIB_PATH
C:\WWW\hbhdxf\thinkphp\library\
CORE_PATH
C:\WWW\hbhdxf\thinkphp\library\think\
TRAIT_PATH
C:\WWW\hbhdxf\thinkphp\library\traits\
ROOT_PATH
C:\WWW\hbhdxf\public/..\
EXTEND_PATH
C:\WWW\hbhdxf\public/..\extend\
VENDOR_PATH
C:\WWW\hbhdxf\public/..\vendor\
RUNTIME_PATH
C:\WWW\hbhdxf\public/..\runtime\
LOG_PATH
C:\WWW\hbhdxf\public/..\runtime\log\
CACHE_PATH
C:\WWW\hbhdxf\public/..\runtime\cache\
TEMP_PATH
C:\WWW\hbhdxf\public/..\runtime\temp\
CONF_PATH
C:\WWW\hbhdxf\public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true