title: mySQL format number output , thousands separator
body: <p>I have a mySQL query which is outputting decimal fields with a comma.</p>
  
  <pre><code>SELECT Metals.Metal, FORMAT(Fixes.GBPam, 3) AS AM, FORMAT(Fixes.GBPpm, 3) AS PM,     
  DATE_FORMAT(Fixes.DateTime, '%d-%m-%y') AS Date
  FROM Fixes, Metals
  WHERE Metals.Id = Fixes.Metals_Id
  </code></pre>
  
  <p>Fields GBPam and GBPpm are both of type <code>decimal(10,5)</code></p>
  
  <p>Now I want columns AM and PM to be formatted to 3 decimal places in my sql query - Correct</p>
  
  <p>I want values in the thousands to be formatted as xxxx.xxx and not x,xxx.xxx - Incorrect</p>
  
  <p>Example output from mysql query:</p>
  
  <pre><code>Metal       AM          PM          Date
  Gold        1,081.334   NULL    11-09-12
  Silver      21.009      NULL    10-09-12
  Platinum    995.650     NULL    11-09-12
  Palladium   416.700     NULL    11-09-12
  </code></pre>
  
  <p>Can you see that output for Gold AM is 1,081.334? How can I get it to output 1081.334?</p>
  
  <p>This is a pain in the ass for me because I have to then muck about in PHP to remove the comma. I would prefer to just get mysql to format it correctly.</p>