[10501] PDOException in Connection.php line 385

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'page' 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...', ['where_AND_state' => [1, 1], 'where_AND_classid_in_1' => ['434', 1], 'where_AND_classid_in_2' => ['435', 1], ...], false, true) in Query.php line 255
  3. at Query->query('SELECT COUNT(*) AS t...', ['where_AND_state' => [1, 1], 'where_AND_classid_in_1' => ['434', 1], 'where_AND_classid_in_2' => ['435', 1], ...], 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() in Index.php line 252
  9. at Index->shaixuan()
  10. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  11. at App::invokeMethod([object(Index), 'shaixuan'], []) in App.php line 611
  12. at App::module(['index', 'index', 'shaixuan'], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], false) in App.php line 456
  13. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'shaixuan'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 139
  14. at App::run() in start.php line 19
  15. at require('/home/szdtqc2spzkdnt...') in index.php line 22

Exception Datas

PDO Error Info
SQLSTATE 42S22
Driver Error Code 1054
Driver Error Message Unknown column 'page' in 'where clause'
Database Status
Error Code 10501
Error Message SQLSTATE[42S22]: Column not found: 1054 Unknown column 'page' in 'where clause'
Error SQL SELECT COUNT(*) AS tp_count FROM `product` WHERE `state` = 1 AND `page` = '3' AND `classid` IN (434,435,436,422,437,438,445,446,447,439,440,441,442,443,444,448,450,449,451,452,453,454,455,456,457,459,458,460,462,463,464,461,1) LIMIT 1
Database Config
type mysql
hostname 127.0.0.1
database szdtqc
hostport
dsn
params []
charset utf8
prefix
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

page
3
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_REDIRECT_UNIQUE_ID
ZHhcjGae69ZHz1uP9Wr81AAAABw
REDIRECT_REDIRECT_PHPRC
/home/szdtqc2spzkdnt4q3c/others
REDIRECT_REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
ZHhcjGae69ZHz1uP9Wr81AAAABw
REDIRECT_PHPRC
/home/szdtqc2spzkdnt4q3c/others
REDIRECT_HANDLER
php-cgi
REDIRECT_STATUS
200
UNIQUE_ID
ZHhcjGae69ZHz1uP9Wr81AAAABw
PHPRC
/home/szdtqc2spzkdnt4q3c/others
HTTP_X_FORWARDED_FOR
107.179.85.194
HTTP_X_REAL_IP
107.179.85.194
HTTP_HOST
www.theafricahouse-zanzibar.com
HTTP_CONNECTION
close
HTTP_USER_AGENT
Baiduspider+(+http://www.baidu.com/search/spider.htm")
HTTP_ACCEPT
*/*
HTTP_REFERER
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
<address>Apache Server at www.theafricahouse-zanzibar.com Port 80</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.theafricahouse-zanzibar.com
SERVER_ADDR
127.0.0.1
SERVER_PORT
80
REMOTE_ADDR
107.179.85.194
DOCUMENT_ROOT
/home/szdtqc2spzkdnt4q3c/wwwroot
REQUEST_SCHEME
http
CONTEXT_PREFIX
/php-run-as-cgi
CONTEXT_DOCUMENT_ROOT
/usr/php7.2/bin
SERVER_ADMIN
webmaster@szdtqc
SCRIPT_FILENAME
/home/szdtqc2spzkdnt4q3c/wwwroot/index.php
REMOTE_PORT
46598
REDIRECT_URL
/index.php/sx/1
REDIRECT_QUERY_STRING
page=3
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
page=3
REQUEST_URI
/sx/1?page=3
SCRIPT_NAME
/index.php
PATH_INFO
/sx/1
PATH_TRANSLATED
/home/szdtqc2spzkdnt4q3c/wwwroot/sx/1
ORIG_PATH_INFO
/index.php/sx/1
ORIG_SCRIPT_NAME
/php-run-as-cgi/php-cgi
ORIG_SCRIPT_FILENAME
/usr/php7.2/bin/php-cgi
ORIG_PATH_TRANSLATED
/home/szdtqc2spzkdnt4q3c/wwwroot/index.php/sx/1
PHP_SELF
/index.php/sx/1
REQUEST_TIME_FLOAT
1685609612.4371
REQUEST_TIME
1685609612
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/application/
CONF_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/config/
THINK_VERSION
5.0.24
THINK_START_TIME
1685609612.4383
THINK_START_MEM
395736
EXT
.php
DS
/
THINK_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/thinkphp/
LIB_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/thinkphp/library/
CORE_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/thinkphp/library/think/
TRAIT_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/thinkphp/library/traits/
ROOT_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/
EXTEND_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/extend/
VENDOR_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/vendor/
RUNTIME_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/runtime/
LOG_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/runtime/log/
CACHE_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/runtime/cache/
TEMP_PATH
/home/szdtqc2spzkdnt4q3c/wwwroot/runtime/temp/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
PAGES_SIZE
12
TP_SIZI
115678800
CHCHES
1200
0.095951s