title: query can't find data on wp / gravity forms database
body: <p>I'm hoping this is an easy question for someone although I am trying to figure it out and getting nowhere.  All I am trying to do is have some PHP code query the wordpress database to pull some information out of the table that stores entries for the gravity forms plugin.  Here is my code:</p>
  
  <pre><code>global $wpdb;
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=1.1") as $key200 =&gt; $row200) {
  $street_address = $row200-&gt;value;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=1.3") as $key200 =&gt; $row200) {
  $city = $row200-&gt;value;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=1.4") as $key200 =&gt; $row200) {
  $state = $row200-&gt;value;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=1.5") as $key200 =&gt; $row200) {
  $zip_code = $row200-&gt;value;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=7") as $key200 =&gt; $row200) {
  $credit = $row200-&gt;value;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id") as $key200 =&gt; $row200) {
  $form_id = $row200-&gt;form_id;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=2") as $key200 =&gt; $row200) {
  $financing_type = $row200-&gt;value;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=3") as $key200 =&gt; $row200) {
  $home_worth = $row200-&gt;value;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=4") as $key200 =&gt; $row200) {
  $to_borrow = $row200-&gt;value;
  }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=6") as $key200 =&gt; $row200) {
  $down_payment = $row200-&gt;value;
   }
  
  foreach( $wpdb-&gt;get_results("SELECT * FROM wp_rg_lead_detail WHERE lead_id=$entry_id AND field_number=5") as $key200 =&gt; $row200) {
  $purchase_price = $row200-&gt;value;
  }
  </code></pre>
  
  <p>I am using the $wpdb object to access the wordpress database.  Most of these queries are working fine.  There are three of them not working (city, state and street address)</p>
  
  <p>I am pretty sure this has something to do with the query select statement having "AND field_number=1.3".  The fact that the value it is looking for is 1.3 for some reason is causing a problem.  there is a fourth query like this that is working - which is "zip_code" where the field number is 1.5 and it pulls that one in OK...</p>
  
  <p>I know these field numbers are correct (1.1, 1.3 and 1.4) as I can see them in the database that way.  So I am thinking I need to somehow modify my queries (at least for those three items) so it can pull in the values properly. I have tried a number of things and nothing seems to help.</p>
  
  <p>So I am hoping someone on here can provide some input on this and what I am doing wrong.  </p>
  
  <p>All the best,  Gerard </p>