MySQL format numbers with comma
Use the FORMAT function, which works for floating point numbers as well as for integers:

Floating point numbers:

mysql&gt; SELECT FORMAT(12332.123456, 4);
        -&gt; '12,332.1235'
mysql&gt; SELECT FORMAT(12332.1,4);
        -&gt; '12,332.1000'
mysql&gt; SELECT FORMAT(12332.2,0);
        -&gt; '12,332'


Integers:

mysql&gt; SELECT FORMAT(12334, 0);
        -&gt; 12,334