title: Prepared statements and floats
body: <p>I am playing with my own implementation of <a href="https://developers.google.com/maps/articles/phpsqlajax_v3" rel="noreferrer">Google maps</a> and I want to do it properly through prepared statements and mysqli object (not mysql as stated in the linked example) Also, I added "own registration" so I am afraid of SQL Injection. But, how do I bind Float value to the prepared statement?</p>
  
  <p>My table has (among others) <code>FLOAT</code> type columns:</p>
  
  <pre><code>CREATE TABLE `markers` (
  `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
  `name` VARCHAR( 60 ) NOT NULL ,
  `description` TEXT NOT NULL ,
  `lat` FLOAT( 10, 6 ) NOT NULL ,
  `lng` FLOAT( 10, 6 ) NOT NULL ,  
  ) ENGINE = MYISAM ;
  </code></pre>
  
  <p>But reading the <a href="http://www.php.net/manual/en/mysqli-stmt.bind-param.php" rel="noreferrer">manual</a> I can see only these types:</p>
  
  <pre><code>Character   Description
  i   corresponding variable has type integer
  d   corresponding variable has type double
  s   corresponding variable has type string
  b   corresponding variable is a blob and will be sent in packets
  </code></pre>
  
  <p>Should I assume that when column is a <code>FLOAT</code> i should use <code>b</code> for a blob? (because its not string and not a double value). And the same for <code>TEXT</code> type column?</p>