我正面临有线问题!PHP/MYSQLI - BIGINT值更改为负数
我有一个叫“学生”与类型BIGINT, 之一cloumn stuID表,当我尝试像“20122222222”这列分配一个值, 如果我做手工它做工精细!但我的代码也变更为负值 我搜索在计算器的类似的问题,我找到了答案bind_param改为串像
$stmt->bind_param('s',$stuID);
我做到了,还是同样的问题
这里的功能
public function insertStudent($stuID)
{
if($stmt = $this->mysqli->prepare("INSERT INTO student(stuID) VALUES(?)"))
{
$stmt->bind_param('s',$stuID);
$stmt->execute();
$stmt->close();
}
else
{
die(printf("Prepared Statement Error: %s\n", $this->mysqli->error));
}
}
谢谢大家
是列类型BIGINT UNSIGNED? – Matteo
'CREATE TABLE IF NOT EXISTS学生( stuID BIGINT(20)NOT NULL, PRIMARY KEY(stuID) )ENGINE = InnoDB的默认字符集= LATIN1;' 这里的表 – user2751638
你为什么要绑定一个字符串'bind_param(” S',$ stuID);'? –