[10501] PDOException in Connection.php line 385

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cid' 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 * FROM `tb_go...', ['where_AND_is_del' => [0, 1]], false, false) in Query.php line 255
  3. at Query->query('SELECT * FROM `tb_go...', ['where_AND_is_del' => [0, 1]], false, false) in Query.php line 2523
  4. at Query->select() in Index.php line 25
  5. at Index->index()
  6. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  7. at App::invokeMethod([object(Index), 'index'], []) in App.php line 611
  8. at App::module(['', null, null], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['', null, null]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  10. at App::run() in index.php line 44

Exception Datas

PDO Error Info
SQLSTATE 42S22
Driver Error Code 1054
Driver Error Message Unknown column 'cid' in 'where clause'
Database Status
Error Code 10501
Error Message SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cid' in 'where clause'
Error SQL SELECT * FROM `tb_goods` WHERE `cid` = 1 AND `is_del` = 0
Database Config
type mysql
hostname 127.0.0.1
database mxjyedu
hostport 3306
dsn
params []
charset utf8
prefix tb_
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 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

USER
www
HOME
/home/www
HTTP_REFERER
http://minxuejiaoyu.com/
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
minxuejiaoyu.com
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
minxuejiaoyu.com
SERVER_PORT
443
SERVER_ADDR
172.28.106.217
REMOTE_PORT
39948
REMOTE_ADDR
3.237.32.143
SERVER_SOFTWARE
nginx/1.20.2
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/web/mxjy
DOCUMENT_URI
/index.php
REQUEST_URI
/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/web/mxjy/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711706159.9745
REQUEST_TIME
1711706159
Environment Variables
empty

ThinkPHP Constants

__PUBLIC__
/public
__BASE__
ROOT_PATH
/web/mxjy/
APP_PATH
/web/mxjy/__app__/
DATA_PATH
/web/mxjy/runtime/Data/
PLUGIN_PATH
/web/mxjy/plugins/
THINK_VERSION
5.0.24
THINK_START_TIME
1711706159.9751
THINK_START_MEM
378640
EXT
.php
DS
/
THINK_PATH
/web/mxjy/__core__/
LIB_PATH
/web/mxjy/__core__/library/
CORE_PATH
/web/mxjy/__core__/library/think/
TRAIT_PATH
/web/mxjy/__core__/library/traits/
EXTEND_PATH
/web/mxjy/extend/
VENDOR_PATH
/web/mxjy/vendor/
RUNTIME_PATH
/web/mxjy/runtime/
LOG_PATH
/web/mxjy/runtime/log/
CACHE_PATH
/web/mxjy/runtime/cache/
TEMP_PATH
/web/mxjy/runtime/temp/
CONF_PATH
/web/mxjy/__app__/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
MAX_MENU_LENGTH
3
MAX_SUB_MENU_LENGTH
5