title: PHP float/double stored as MySQL DECIMAL
body: <p>i ran into a really strange problem with storing values in MySQL. The premise:</p>
  
  <p>I have a table that uses <code>DECIMAL(15,8)</code> to store monetary values (like the total of order), but when i try to insert for example:</p>
  
  <pre><code>2,45545345
  </code></pre>
  
  <p>this is stored as</p>
  
  <pre><code>2.00000000
  </code></pre>
  
  <p>I tried MySQL's FORMAT/CAST functions but still the same output.</p>
  
  <p>This is how the query gets generated:</p>
  
  <pre><code>$db-&gt;query("INSERT INTO `random_table_name` SET currency_value = '" . floatval($value) . "'");
  </code></pre>
  
  <p>i also tried <code>doubleval</code>, but same result. The funny thing is though that this same piece of code was working fine a couple of weeks ago and i can't recall any changes to the db structure or the db class that can cause this.</p>