把productprice字段由以前的int 改成decimal(20,2)后,在写入时空白,但数据是写入数据库了,这是为什么。
$sql2 = "insert into shop_shopping(ordertype,ordersn,userid,productid,productno,productname,productprice,productcolor,carnumber,total,re,content,shipmentid,paymentid) values($ordertype,'$ordernumber',$userid,$productid,'$productno','$productname',$productprice,'$productcolor',$carnumber,$total,'$re','$xcontent',$shipmentid,$paymentid)";