Question

I have a column called currency which I am retrieve from SQL Server.
The column contains 1234567.789456

I want to show this in 1,234,567.789456
I just want to show the currency in comma separated form only in price column.

Was it helpful?

Solution

Format at the client using PHP's number_format() function (thanks @karthikr for the link). PHP is more than capable of adding thousands separators to numbers; it is much more expensive to ask SQL Server to do this.

OTHER TIPS

I got it. I can use it like number_format(1,234,567.789456)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top