title: PHP PDO Select ID
body: <p>I'm learning PDO from <a href="http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/" rel="nofollow">NetTuts</a> and have had success so far searching FETCH_ASSOC based on strings. </p>
  
  <p>Question: Which <code>PDO::</code> is needed in order to search by integers? I thought it was <code>PDO::Fetch_OBJ</code>. The following is returning false.</p>
  
  <pre><code>$busid = $this-&gt;sanitize($string);
  
  $database-&gt;query('SELECT name, address FROM business_information WHERE id = :id', array(':id' =&gt; $busid));  
  var_dump($database);
      if($database-&gt;count() &gt;= '1') {
                  $results-&gt;setFetchMode(PDO::FETCH_OBJ); 
                     while($row = $results-&gt;fetch()) { 
                          $test = "Name: ".$row['name']." Address: ".$row['address'];             
  
      }else{
          $test = "no results were found";
  
      }
  </code></pre>
  
  <p>var_dump returns: </p>
  
  <blockquote>
    <p>object(database)#1 (7) {["pdo":"database":private]=> object(PDO)#2 (0)
    { } ["port"]=> int(3306) ["statement"]=> object(PDOStatement)#6 (1) {
    ["queryString"]=> string(61) "SELECT name, address FROM
    business_information WHERE id = :id" } }</p>
  </blockquote>