mysql select int as currency or convert int to currency format?
mysql
Solution
FORMAT() function: http://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_format
SELECT CONCAT('$', FORMAT(val, 2)) ... ;
Problem
Is there a way to convert an int while selecting to an currency format. I can concat the '$' symbol but how do you place the ,'s in? Like turning int =1000 into $1,000? Or there is one function that can do it all? Is there a string replacement?