trailing zeroes not going into database

前端 未结 3 735
迷失自我
迷失自我 2021-01-22 10:38

So here is my issue, We are trying to put pricing into our database but for some reason it converts 10.00 to 10 OR 10.50 to 10.5 it keeps it just chops off the trailing zeroes..

3条回答
  •  感动是毒
    2021-01-22 11:07

    10 is the same as 10.00 is the same as 10.0

    if you want to display with those trailing digits, or as it's more commonly known 2 decimal places, then you will need to write your code to do that. Since you've not said what language you're using I can't really help you with that part.

提交回复
热议问题