title: Selecting a float in MySQL
body: <p>I am trying to do a <code>SELECT</code> match on a table based upon an identifier and a price, such as:</p>
  
  <pre><code>SELECT * FROM `table` WHERE `ident`='ident23' AND `price`='101.31';
  </code></pre>
  
  <p>The above returns zero rows, while if you remove the <code>price='101.31'</code> bit it returns the correct row.  </p>
  
  <p>Doing a...</p>
  
  <pre><code>SELECT * FROM `table`;
  </code></pre>
  
  <p>Returns the same row as above and quite clearly states that <code>price='101.31'</code>.  Yet select fails to match it.  Changing <code>=</code> to <code>&lt;=</code> makes it work - but this is not exactly a solution.</p>
  
  <p>Is there a way of casting the MySQL float to 2 digits before the operation is performed on it, thus making the above <code>SELECT</code> work (or some other solution)?</p>
  
  <p>Thanks!</p>