title: What type of format should I use when using $wpdb->insert on a double?
body: <p>I am going to be storing 3 pieces of info into my DB: the post_id, a trans_id, and a trans_amount (money). An example of a trans_id looks like <code>9q5fcs</code> so I reason that I should use <code>%s</code> for string. How can I have the <code>$wpdb</code> object store trans_amount as a double? </p>
  
  <p>The post_id is simply the post id that gets returned when using the same insert function. I am using it in a another block of code before this. However, when I set its format to be inserted as <code>%d</code>, it does not get inserted in the DB. The DB field is set to int(11).</p>
  
  <p><strong>Code</strong>: </p>
  
  <pre><code>global $wpdb;
  
          $wpdb-&gt;insert( $wpdb-&gt;prefix . 'fd_transactions', array( 'trans_amount' =&gt; $amount), '%s');
          $wpdb-&gt;insert( $wpdb-&gt;prefix . 'fd_transactions', array( 'post_id' =&gt; $_SESSION['fd_post_id']), '%d');
          $wpdb-&gt;insert( $wpdb-&gt;prefix . 'fd_transactions', array( 'trans_id' =&gt; $trans_id), '%s');
  </code></pre>