public function admin_add()
{
//dump(input('post.'));
if(request()->isPost()){
$data = [
'username'=>input('username'),
'password'=>md5(input('password')),
'logintime'=>time(),
];
if(db('user')->insert($data)){
}
}else{
echo 'n';
}总是出现Driver Error Message Duplicata du champ '4294967295' pour la clef 'PRIMARY'
Databa
Error Code 10501
Error Message SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicata du champ '4294967295' pour la clef 'PRIMARY'
Error SQL INSERT INTO `hd_user` (`username` , `password` , `logintime`) VALUES ('admin' , '698d51a19d8a121ce581499d7b701668' , 1504709461)
之前上面这sql在数据裤也不能正常写入的报同样的错,然后修改了表,数据裤能正常写入了,可tp还是一样
问题提示
[10501] PDOException in Connection.php line 451
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicata du champ '4294967295' pour la clef 'PRIMARY'
// 调试结束
$this->debug(false);
$this->numRows = $this->PDOStatement->rowCount();
return $this->numRows;
} catch (\PDOException $e) {
if ($this->isBreak($e)) {
return $this->close()->execute($sql, $bind);
}
throw new PDOException($e, $this->config, $this->getLastsql());
} catch (\Exception $e) {
if ($this->isBreak($e)) {
return $this->close()->execute($sql, $bind);
}
throw $e;
}
}
/** 最佳答案