[10501] PDOException in Connection.php line 385

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

  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 385
  2. at Connection->query('SHOW COLUMNS FROM `s...', [], false, true) in Mysql.php line 65
  3. at Mysql->getFields('`sun_happiness_goods...') in Query.php line 1921
  4. at Query->getTableInfo('sun_happiness_goods', 'type') in Query.php line 1969
  5. at Query->getFieldsType('sun_happiness_goods') in Query.php line 1975
  6. at Query->getFieldsBind('sun_happiness_goods') in Builder.php line 270
  7. at Builder->buildWhere([], ['table' => 'sun_happiness_goods', 'field' => ['id', 'name', 'createtime', ...], 'order' => ['createtime desc'], ...]) in Builder.php line 240
  8. at Builder->parseWhere([], ['table' => 'sun_happiness_goods', 'field' => ['id', 'name', 'createtime', ...], 'order' => ['createtime desc'], ...]) in Builder.php line 725
  9. at Builder->select(['table' => 'sun_happiness_goods', 'field' => ['id', 'name', 'createtime', ...], 'order' => ['createtime desc'], ...]) in Query.php line 2511
  10. at Query->select() in Index.php line 23
  11. at Index->index()
  12. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  13. at App::invokeMethod([object(Index), 'index'], []) in App.php line 611
  14. at App::module(['index', 'happiness.index', null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  15. at App::exec(['type' => 'module', 'module' => ['index', 'happiness.index', null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  16. at App::run() in start.php line 19
  17. at require('/www/wwwroot/www.sun...') in index.php line 23

Exception Datas

PDO Error Info
SQLSTATE 42S02
Driver Error Code 1146
Driver Error Message Table 'sun.sun_happiness_goods' doesn't exist
Database Status
Error Code 10501
Error Message SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sun.sun_happiness_goods' doesn't exist
Error SQL SHOW COLUMNS FROM `sun_happiness_goods`
Database Config
type mysql
hostname 127.0.0.1
database sun
hostport
dsn
params []
charset utf8mb4
prefix sun_
debug false
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
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

page
2
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
SCRIPT_NAME
/index.php
REQUEST_URI
/index/happiness/index.html?page=2
QUERY_STRING
s=/index/happiness/index.html&page=2
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
s=/index/happiness/index.html&page=2
REDIRECT_URL
/index/happiness/index.html
REMOTE_PORT
41186
SCRIPT_FILENAME
/www/wwwroot/www.sun.as/public/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/www.sun.as/public
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/www/wwwroot/www.sun.as/public
REMOTE_ADDR
3.88.185.100
SERVER_PORT
80
SERVER_ADDR
122.114.26.245
SERVER_NAME
www.sun.as
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at www.sun.as Port 80</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_HOST
www.sun.as
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
proxy-nokeepalive
1
REDIRECT_STATUS
200
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711711692.2936
REQUEST_TIME
1711711692
PATH_INFO
/index/happiness/index.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.sun.as/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711711692.2986
THINK_START_MEM
409096
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.sun.as/thinkphp/
LIB_PATH
/www/wwwroot/www.sun.as/thinkphp/library/
CORE_PATH
/www/wwwroot/www.sun.as/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.sun.as/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.sun.as/
EXTEND_PATH
/www/wwwroot/www.sun.as/extend/
VENDOR_PATH
/www/wwwroot/www.sun.as/vendor/
RUNTIME_PATH
/www/wwwroot/www.sun.as/runtime/
LOG_PATH
/www/wwwroot/www.sun.as/runtime/log/
CACHE_PATH
/www/wwwroot/www.sun.as/runtime/cache/
TEMP_PATH
/www/wwwroot/www.sun.as/runtime/temp/
CONF_PATH
/www/wwwroot/www.sun.as/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
HTMLPURIFIER_PREFIX
/www/wwwroot/www.sun.as/vendor/ezyang/htmlpurifier/library
ADDON_PATH
/www/wwwroot/www.sun.as/addons/
XS_APP_ROOT
/www/wwwroot/www.sun.as/addons/xunsearch/data