[10501] PDOException in Connection.php line 385

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'hanpinku' 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 385
  2. at Connection->query('SELECT COUNT(*) AS t...', [], false, true) in Query.php line 255
  3. at Query->query('SELECT COUNT(*) AS t...', [], false, true) in Query.php line 2470
  4. at Query->getPdo() in Query.php line 441
  5. at Query->value('COUNT(*) AS tp_count', 0, true) in Query.php line 576
  6. at Query->aggregate('COUNT', '*', true) in Query.php line 551
  7. at Query->count() in Query.php line 1484
  8. at Query->paginate(10, false, ['type' => 'bootstrap', 'var_page' => 'page', 'list_rows' => 15, ...]) in Index.php line 45
  9. at Index->index()
  10. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  11. at App::invokeMethod([object(Index), 'index'], []) in App.php line 611
  12. at App::module(['index', 'index', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  13. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'index'], '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('/home/wwwroot/hott.q...') in index.php line 24

Exception Datas

PDO Error Info
SQLSTATE 42S22
Driver Error Code 1054
Driver Error Message Unknown column 'hanpinku' in 'where clause'
Database Status
Error Code 10501
Error Message SQLSTATE[42S22]: Column not found: 1054 Unknown column 'hanpinku' in 'where clause'
Error SQL SELECT COUNT(*) AS tp_count FROM `yyarticle` `a` LEFT JOIN `yyuser` `u` ON `a`.`uid`=`u`.`id` WHERE `a`.`status` = '1' AND ( find_in_set(hanpinku,category_ids) ) AND `a`.`deletetime` IS NULL LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database quntuishoucom
hostport
dsn
params []
charset utf8
prefix yy
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
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_PATH_INFO
chanpinku/2018/1018/246.html
REDIRECT_STATUS
200
HTTP_HOST
www.quntuishou.com
HTTP_X_REAL_IP
3.87.133.69
HTTP_X_FORWARDED_PROTO
http
HTTP_CONNECTION
close
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH
/usr/local/apache/lib
SERVER_SIGNATURE
<address>Apache Server at www.quntuishou.com Port 80</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.quntuishou.com
SERVER_ADDR
127.0.0.1
SERVER_PORT
80
REMOTE_ADDR
3.87.133.69
DOCUMENT_ROOT
/home/wwwroot/hott.quntuishou.com/public
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/home/wwwroot/hott.quntuishou.com/public
SERVER_ADMIN
webmaster@example.com
SCRIPT_FILENAME
/home/wwwroot/hott.quntuishou.com/public/index.php
REMOTE_PORT
56880
REDIRECT_URL
/chanpinku/2018/1018/246.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.0
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/chanpinku/2018/1018/246.html
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711652986.375
REQUEST_TIME
1711652986
PATH_INFO
chanpinku/2018/1018/246.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/wwwroot/hott.quntuishou.com/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711652986.376
THINK_START_MEM
407832
EXT
.php
DS
/
THINK_PATH
/home/wwwroot/hott.quntuishou.com/thinkphp/
LIB_PATH
/home/wwwroot/hott.quntuishou.com/thinkphp/library/
CORE_PATH
/home/wwwroot/hott.quntuishou.com/thinkphp/library/think/
TRAIT_PATH
/home/wwwroot/hott.quntuishou.com/thinkphp/library/traits/
ROOT_PATH
/home/wwwroot/hott.quntuishou.com/
EXTEND_PATH
/home/wwwroot/hott.quntuishou.com/extend/
VENDOR_PATH
/home/wwwroot/hott.quntuishou.com/vendor/
RUNTIME_PATH
/home/wwwroot/hott.quntuishou.com/runtime/
LOG_PATH
/home/wwwroot/hott.quntuishou.com/runtime/log/
CACHE_PATH
/home/wwwroot/hott.quntuishou.com/runtime/cache/
TEMP_PATH
/home/wwwroot/hott.quntuishou.com/runtime/temp/
CONF_PATH
/home/wwwroot/hott.quntuishou.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/home/wwwroot/hott.quntuishou.com/addons/