[10501] PDOException in Connection.php line 390

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'book.lg_message' 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 390
  2. at Connection->query('SHOW COLUMNS FROM `l...', [], false, true) in Mysql.php line 65
  3. at Mysql->getFields('`lg_message`') in Query.php line 1883
  4. at Query->getTableInfo('lg_message', 'type') in Query.php line 1931
  5. at Query->getFieldsType('lg_message') in Query.php line 1937
  6. at Query->getFieldsBind('lg_message') in Builder.php line 266
  7. at Builder->buildWhere(['AND' => ['status' => ['eq', 1], 'content_id' => ['exp', object(Expression)]]], ['multi' => ['AND' => ['status' => [['eq', 1]], 'content_id' => [['exp', object(Expression)]]]], 'where' => ['AND' => ['status' => ['eq', 1], 'content_id' => ['exp', object(Expression)]]], 'fetch_sql' => true, ...]) in Builder.php line 236
  8. at Builder->parseWhere(['AND' => ['status' => ['eq', 1], 'content_id' => ['exp', object(Expression)]]], ['multi' => ['AND' => ['status' => [['eq', 1]], 'content_id' => [['exp', object(Expression)]]]], 'where' => ['AND' => ['status' => ['eq', 1], 'content_id' => ['exp', object(Expression)]]], 'fetch_sql' => true, ...]) in Builder.php line 715
  9. at Builder->select(['multi' => ['AND' => ['status' => [['eq', 1]], 'content_id' => [['exp', object(Expression)]]]], 'where' => ['AND' => ['status' => ['eq', 1], 'content_id' => ['exp', object(Expression)]]], 'fetch_sql' => true, ...]) in Query.php line 2415
  10. at Query->getPdo() in Query.php line 434
  11. at Query->value('COUNT(*) AS tp_count', 0, true) in Query.php line 540
  12. at Query->count() in HasMany.php line 163
  13. at HasMany->getRelationCountQuery(object(Closure)) in Query.php line 2101
  14. at Query->withCount('message')
  15. at call_user_func_array([object(Query), 'withCount'], [['message' => object(Closure)]]) in Model.php line 2174
  16. at Model->__call('withCount', [['message' => object(Closure)]]) in Index.php line 28
  17. at Index->index()
  18. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  19. at App::invokeMethod([object(Index), 'index'], []) in App.php line 606
  20. at App::module([null, 'index', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  21. at App::exec(['type' => 'module', 'module' => [null, 'index', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  22. at App::run() in start.php line 19
  23. at require('/var/www/html/book/t...') in index.php line 17

Exception Datas

PDO Error Info
SQLSTATE 42S02
Driver Error Code 1146
Driver Error Message Table 'book.lg_message' doesn't exist
Database Status
Error Code 10501
Error Message SQLSTATE[42S02]: Base table or view not found: 1146 Table 'book.lg_message' doesn't exist
Error SQL SHOW COLUMNS FROM `lg_message`
Database Config
type mysql
hostname 47.94.209.185
database book
hostport
dsn
params []
charset utf8
prefix lg_
debug true
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 Y-m-d
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

UNIQUE_ID
XIoQfmGCqay9qdpeXCvfvwAAAA8
HTTP_HOST
vrack.net
HTTP_USER_AGENT
Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip,deflate
HTTP_REFERER
http://vrack.net/
HTTP_CLIENT_IP
66.136.63.238
HTTP_X_FORWARDED_FOR
60.188.129.90
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.11
SERVER_NAME
vrack.net
SERVER_ADDR
172.16.42.31
SERVER_PORT
80
REMOTE_ADDR
156.235.189.114
DOCUMENT_ROOT
/var/www/html/book/public
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/var/www/html/book/public
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/var/www/html/book/public/index.php
REMOTE_PORT
51306
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1552552062.017
REQUEST_TIME
1552552062
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/var/www/html/book/public/../application/
THINK_VERSION
5.0.20
THINK_START_TIME
1552552062.0177
THINK_START_MEM
393520
EXT
.php
DS
/
THINK_PATH
/var/www/html/book/thinkphp/
LIB_PATH
/var/www/html/book/thinkphp/library/
CORE_PATH
/var/www/html/book/thinkphp/library/think/
TRAIT_PATH
/var/www/html/book/thinkphp/library/traits/
ROOT_PATH
/var/www/html/book/
EXTEND_PATH
/var/www/html/book/extend/
VENDOR_PATH
/var/www/html/book/vendor/
RUNTIME_PATH
/var/www/html/book/runtime/
LOG_PATH
/var/www/html/book/runtime/log/
CACHE_PATH
/var/www/html/book/runtime/cache/
TEMP_PATH
/var/www/html/book/runtime/temp/
CONF_PATH
/var/www/html/book/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false