[10501] PDOException in Connection.php line 385

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'A' 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, ['list_rows' => 10, 'type' => 'common\libs\Indexpag...', 'var_page' => 'page', ...]) in Base.php line 70
  9. at Base->getListToPageHome('A', 'sort desc') in Search.php line 25
  10. at Search->index()
  11. at ReflectionMethod->invokeArgs(object(Search), []) in App.php line 343
  12. at App::invokeMethod([object(Search), 'index'], []) in App.php line 611
  13. at App::module(['index', 'search', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  14. at App::exec(['type' => 'module', 'module' => ['index', 'search', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  15. at App::run() in start.php line 19
  16. at require('/data/home/syu715348...') in index.php line 23

Exception Datas

PDO Error Info
SQLSTATE
42S22
Driver Error Code
1054
Driver Error Message
Unknown column 'A' in 'where clause'
Database Status
Error Code
10501
Error Message
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'A' in 'where clause'
Error SQL
SELECT COUNT(*) AS tp_count FROM `think_product` WHERE `A` IS NULL LIMIT 1
Database Config
type
mysql
hostname
sdm715222537.my3w.com
database
sdm715222537_db
hostport
3306
dsn
params
[]
charset
utf8
prefix
think_
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
Y-m-d H:i:s
sql_explain
false
builder
query
\think\db\Query
break_reconnect
false

Environment Variables

GET Data

keywords
深圳T恤衫万博manbetx客户端主页
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

DOCUMENT_ROOT
/usr/home/syu7153480001/htdocs
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_HOST
www.qimeifs.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
PATH
/bin:/usr/bin
PHPRC
/var/www/php71/hichina_ini/syu7153480001
QUERY_STRING
keywords=深圳T恤衫万博manbetx客户端主页
REDIRECT_DOCUMENT_ROOT
/usr/home/syu7153480001/htdocs
REDIRECT_GATEWAY_INTERFACE
CGI/1.1
REDIRECT_HTTP_ACCEPT
*/*
REDIRECT_HTTP_ACCEPT_ENCODING
deflate, gzip
REDIRECT_HTTP_HOST
www.qimeifs.com
REDIRECT_HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
REDIRECT_PATH
/sbin:/usr/sbin:/bin:/usr/bin
REDIRECT_PATH_INFO
search
REDIRECT_QUERY_STRING
keywords=深圳T恤衫万博manbetx客户端主页
REDIRECT_REMOTE_ADDR
161.123.177.62
REDIRECT_REMOTE_PORT
20002
REDIRECT_REQUEST_METHOD
GET
REDIRECT_REQUEST_URI
/search?keywords=深圳T恤衫万博manbetx客户端主页
REDIRECT_SCRIPT_FILENAME
/usr/home/syu7153480001/htdocs/search
REDIRECT_SCRIPT_NAME
/search
REDIRECT_SERVER_ADDR
172.21.115.40
REDIRECT_SERVER_ADMIN
webmaster@syu7153480001.my3w.com
REDIRECT_SERVER_NAME
www.qimeifs.com
REDIRECT_SERVER_PORT
80
REDIRECT_SERVER_PROTOCOL
HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE
Apache
REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
XysRgqwVcygAAETOHzsAAAAX
REDIRECT_URL
/search
REMOTE_ADDR
161.123.177.62
REMOTE_PORT
20002
REQUEST_METHOD
GET
REQUEST_URI
/search?keywords=深圳T恤衫万博manbetx客户端主页
SCRIPT_FILENAME
/usr/home/syu7153480001/htdocs/index.php
SCRIPT_NAME
/index.php
SERVER_ADDR
172.21.115.40
SERVER_ADMIN
webmaster@syu7153480001.my3w.com
SERVER_NAME
www.qimeifs.com
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
UNIQUE_ID
XysRgqwVcygAAETOHzsAAAAX
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1596658050.5296
REQUEST_TIME
1596658050
PATH_INFO
search
Environment Variables
empty

ThinkPHP Constants

APP_VERSION
5.0.0
SITE_PATH
/data/home/syu7153480001/htdocs
ADMIN_DIR
/manage
INDEX_DIR
/
APP_PATH
/data/home/syu7153480001/htdocs/apps/
VENDOR_PATH
/data/home/syu7153480001/htdocs/core/vendor/
EXTEND_PATH
/data/home/syu7153480001/htdocs/apps/
THINK_VERSION
5.0.24
THINK_START_TIME
1596658050.5307
THINK_START_MEM
351064
EXT
.php
DS
/
THINK_PATH
/data/home/syu7153480001/htdocs/core/thinkphp/
LIB_PATH
/data/home/syu7153480001/htdocs/core/thinkphp/library/
CORE_PATH
/data/home/syu7153480001/htdocs/core/thinkphp/library/think/
TRAIT_PATH
/data/home/syu7153480001/htdocs/core/thinkphp/library/traits/
ROOT_PATH
/data/home/syu7153480001/htdocs/
RUNTIME_PATH
/data/home/syu7153480001/htdocs/runtime/
LOG_PATH
/data/home/syu7153480001/htdocs/runtime/log/
CACHE_PATH
/data/home/syu7153480001/htdocs/runtime/cache/
TEMP_PATH
/data/home/syu7153480001/htdocs/runtime/temp/
CONF_PATH
/data/home/syu7153480001/htdocs/apps/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
IS_WAP
false