开发者

Format price column to 2 decimals and round

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜