[10501] PDOException in Connection.php line 388

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'www.hefapower.com' in 'where 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 (\ErrorException $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 * FROM `hf_hf...', [], false, false) in Query.php line 225
  3. at Query->query('SELECT * FROM `hf_hf...', [], false, false) in Query.php line 2474
  4. at Query->find() in News.php line 309
  5. at News->item('www.hefapower.com')
  6. at ReflectionMethod->invokeArgs(object(News), ['www.hefapower.com']) in App.php line 196
  7. at App::invokeMethod([object(News), 'item'], []) in App.php line 412
  8. at App::module(['index', 'news', 'item'], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...], null) in App.php line 295
  9. at App::exec(['type' => 'module', 'module' => ['index', 'news', 'item']], ['app_debug' => true, 'app_trace' => false, 'app_status' => '', ...]) in App.php line 123
  10. at App::run() in start.php line 18
  11. at require('/mnt/www/hefapower/t...') in index.php line 17

Exception Datas

PDO Error Info
SQLSTATE
42S22
Driver Error Code
1054
Driver Error Message
Unknown column 'www.hefapower.com' in 'where clause'
Database Status
Error Code
10501
Error Message
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'www.hefapower.com' in 'where clause'
Error SQL
SELECT * FROM `hf_hf_web_news` WHERE ( id<www.hefapower.com ) ORDER BY id desc LIMIT 1
Database Config
type
mysql
hostname
120.76.97.182
database
hefapower
username
SUNSHING
password
Stamcdq2qdTa2NWQ
hostport
3306
dsn
params
[]
charset
utf8
prefix
hf_
debug
true
deploy
0
rw_separate
false
master_num
1
slave_no
fields_strict
true
result_type
2
resultset_type
array
auto_timestamp
false
datetime_format
Y-m-d H:i:s
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

REDIRECT_PATH_INFO
index/news/item/id/www.hefapower.com
REDIRECT_STATUS
200
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_HOST
hefapower.com
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
hefapower.com
SERVER_ADDR
120.76.97.182
SERVER_PORT
80
REMOTE_ADDR
154.212.233.19
DOCUMENT_ROOT
/mnt/www/hefapower
SERVER_ADMIN
root@localhost
SCRIPT_FILENAME
/mnt/www/hefapower/index.php
REMOTE_PORT
20000
REDIRECT_URL
/index/news/item/id/www.hefapower.com
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/index/news/item/id/www.hefapower.com
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1600434430.395
REQUEST_TIME
1600434430
PATH_INFO
index/news/item/id/www.hefapower.com
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/mnt/www/hefapower/application/
THINK_VERSION
5.0.9
THINK_START_TIME
1600434430.398
THINK_START_MEM
254832
EXT
.php
DS
/
THINK_PATH
/mnt/www/hefapower/thinkphp/
LIB_PATH
/mnt/www/hefapower/thinkphp/library/
CORE_PATH
/mnt/www/hefapower/thinkphp/library/think/
TRAIT_PATH
/mnt/www/hefapower/thinkphp/library/traits/
ROOT_PATH
/mnt/www/hefapower/
EXTEND_PATH
/mnt/www/hefapower/extend/
VENDOR_PATH
/mnt/www/hefapower/vendor/
RUNTIME_PATH
/mnt/www/hefapower/runtime/
LOG_PATH
/mnt/www/hefapower/runtime/log/
CACHE_PATH
/mnt/www/hefapower/runtime/cache/
TEMP_PATH
/mnt/www/hefapower/runtime/temp/
CONF_PATH
/mnt/www/hefapower/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false