Mysql: Incorrect decimal value: '' for column 'goods_weight' at row 1

今天学习TP时遇到一个这样的问题:

Incorrect decimal value: '' for column 'goods_weight' at row 1

这里写图片描述
后来查看MySQL中goods_weight这一列的类型:
这里写图片描述
不为空的decimal


解决方案:
设了不为空却在插入时添加数据为空,很尴尬
注意那个对应的位置不为空就好

猜你喜欢

转载自blog.csdn.net/dyw_666666/article/details/81204454