Laravel PDO更新数据溢出,原生PDO没问题


\DB::update("update at_deliver set real_billing_weight_total=?,pre_billing_weight_total=? where id = ?", [
2147483648,
2147483647,
1
]);
上面的两个字段都是 bigint 的,更新后结果 real_billing_weight_total = 0,pre_billing_weight_total=2147483647
$pdo = new PDOConnection($dsn, $user, $password);
$st = $pdo->prepare("update `at_deliver` set `real_billing_weight_total` = ?,pre_billing_weight_total=? where id = ?");
$st->bindValue(1, 2147483647, \PDO::PARAM_INT);
$st->bindValue(2, 4294967296, \PDO::PARAM_INT);
$st->bindValue(3, 1);
$res = $st->execute();
这样自己更新没问题
这个问题只是在指定的服务器上面才会有问题,感觉框架需要在哪里读取服务器的某个配置导致的,但是定位不出来

运维安装的PDO非官方的,导致的问题,已解决

点赞 取消点赞 收藏 取消收藏

<< 上一篇: Laravel5.2照着手册写报错!!!!大佬指教一下

>> 下一篇: orm model 一个非常非常奇葩的问题