Jump to content

[SOLVED] number formatting


nitation

Recommended Posts

Hello,

 

I just want to know how to format an amount value in my database to have commas.

 

example;

 

the value i entered is 45000, how do i  format it to be like this; 45,000 and when i deduct, it will deduct correctly. Cos when am trying it, it will only deduct the FIGURES before the comma sign.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/114720-solved-number-formatting/
Share on other sites

If none of your numbers contain a comma, subtraction works fine. Also, if you try to store a number with a comma into a field of type "int" it won't work. If you already have your number stored with commas, I would suggest you modify those stored numbers to get rid of the commas.

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.