开发者

Format price column to 2 decimals and round

开发者 https://www.devze.com 2022-12-07 22:25 出处:网络
Table = xxxxx_eshop_products Column = product_price Currently, the prices are all listed in 5 decimal places. This isn\'t a major issue as the e-Commerce extension I use rounds and sets the prices to

Table = xxxxx_eshop_products Column = product_price

Currently, the prices are all listed in 5 decimal places. This isn't a major issue as the e-Commerce extension I use rounds and sets the prices to 2 places. However, being a little anal :-), I'd like the data in MySql to be correct.

Would this work to accomplish this (before I break the table!!!):

UPDATE xxxxx_eshop_products SET product_price = round(product_pric开发者_开发技巧e,2)

It seems to make sense to me, but I'd rather not experiment!

0

精彩评论

暂无评论...
验证码 换一张
取 消