I have this problem starting from getting data from DB to present it to the user.. I have overcame some issues, but I don't think it's a best practice.. Here is my problem:
In my DB, I have a field with type double(15,2)
, I want to show it to the user in this format xxx,xxx,xxx.yy
. Currently if I just show what I got from the DB, it's in something like this format 99e10
.. Is there any best practice to achieve what I want ?
NOTE: I'm currently formatting the value from Javascript which gives some glitches when I continuously refresh the page.