[10501] PDOException in Connection.php line 764

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'index' for column 'cateid' at row 1

  1. $this->numRows = $this->PDOStatement->rowCount();
  2. return $this->numRows;
  3. } catch (\PDOException $e) {
  4. if ($this->isBreak($e)) {
  5. return $this->close()->execute($sql, $bind, $query);
  6. }
  7. throw new PDOException($e, $this->config, $this->getLastsql());
  8. } catch (\Throwable $e) {
  9. if ($this->isBreak($e)) {
  10. return $this->close()->execute($sql, $bind, $query);
  11. }
  12. throw $e;
  13. } catch (\Exception $e) {
  14. if ($this->isBreak($e)) {
  15. return $this->close()->execute($sql, $bind, $query);

Call Stack

  1. in Connection.php line 764
  2. at Connection->execute('INSERT INTO `sx_news...', ['ThinkBind_1_' => ['index', 1], 'ThinkBind_2_' => ['41868', 1], 'ThinkBind_3_' => ['http://gisid.com/inf...', 2], ...], object(Query)) in Connection.php line 964
  3. at Connection->insert(object(Query), false, false, null) in Query.php line 2835
  4. at Query->insert(['cateid' => 'index', 'news_id' => '41868', 'referer' => 'http://gisid.com/inf...', ...]) in News.php line 207
  5. at News::addViewLog('41868', 'index') in Content.php line 134
  6. at Content->index()
  7. at ReflectionMethod->invokeArgs(object(Content), []) in Container.php line 395
  8. at Container->invokeReflectMethod(object(Content), object(ReflectionMethod), ['cateurl' => 'info', 'cateid' => 'index', 'id' => '41868', ...]) in Module.php line 132
  9. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  10. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  11. at Middleware->think\{closure}(object(Request))
  12. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  13. at Middleware->dispatch(object(Request), 'controller') in Module.php line 137
  14. at Module->exec() in Dispatch.php line 168
  15. at Dispatch->run() in App.php line 432
  16. at App->think\{closure}(object(Request), object(Closure), null)
  17. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  18. at Middleware->think\{closure}(object(Request))
  19. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  20. at Middleware->dispatch(object(Request)) in App.php line 435
  21. at App->run() in index.php line 21

Exception Datas

PDO Error Info
SQLSTATE HY000
Driver Error Code 1366
Driver Error Message Incorrect integer value: 'index' for column 'cateid' at row 1
Database Status
Error Code 10501
Error Message SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'index' for column 'cateid' at row 1
Error SQL INSERT INTO `sx_news_view_log` (`cateid` , `news_id` , `referer` , `add_ip` , `add_date` , `add_time`) VALUES (index , 41868 , 'http://gisid.com/info/index/41868' , '44.204.24.82' , '2024-03-29' , '2024-03-29 03:47:57')
Database Config
type mysql
hostname 127.0.0.1
database gisid_com
hostport 3306
dsn
params []
charset utf8
prefix sx_
debug true
deploy 0
rw_separate false
master_num 1
slave_no
read_master false
fields_strict true
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
break_match_str []

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.gisid.com
HTTP_REFERER http://gisid.com/info/index/41868
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME gisid.com
SERVER_PORT 80
SERVER_ADDR 172.31.110.233
REMOTE_PORT 50996
REMOTE_ADDR 44.204.24.82
SERVER_SOFTWARE nginx/1.20.2
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/gisid.com/public
DOCUMENT_URI /index.php
REQUEST_URI /info/index/41868
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/info/index/41868
SCRIPT_FILENAME /www/wwwroot/gisid.com/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711655277.6161
REQUEST_TIME 1711655277
Environment Variablesempty
ThinkPHP Constants
MAX_MENU_LENGTH 3
MAX_SUB_MENU_LENGTH 5
MODULE_NAME content
ACTION_NAME index