Tencent / Biny

Biny is a tiny, high-performance PHP framework for web applications
BSD 3-Clause "New" or "Revised" License
1.69k stars 258 forks source link

数据库操作 + - 不支持浮点数操作 #128

Open 3DMXM opened 3 years ago

3DMXM commented 3 years ago

如果使用的话, $result = $this->testDAO->update(['type'=>['+'=>1.3]]);

结果好像会被会被取整

数据库的类型已经设置成double了

直接赋予一个浮点数没有问题,

billge1205 commented 3 years ago

找到问题了 处理sql注入保护的时候强转intval了 稍等我想想处理下

billge1205 commented 3 years ago

https://github.com/Tencent/Biny/commit/e6f5511e30ba92c4d1f87faf97a0ce7747dc3b67 两个对应的文件修改已更新 替换下即可

3DMXM commented 3 years ago

好的,谢谢