title: PDO query returns result, but i cant fetch it
body: <p>Hello im trying out PDO and im stucked in a weird situation.</p>
  
  <pre><code>$statement-&gt;fetch()
  </code></pre>
  
  <p>returns me the desired results, but when i try to fetch em , while doesnt seem to work. I tried use <code>$statement-&gt;fetchAll()</code> with <code>foreach</code> but it doesnt work either.</p>
  
  <p>I also tried <code>fetch(PDO::FETCH_ASSOC)</code> but again no luck. AM i doing something wrong ?</p>
  
  <pre><code>$pdoObject = new PDO("mysql:host=$dbhost;dbname=$dbname;", $dbuser, $dbpass);
  $pdoObject -&gt; exec("set names utf8");
  $sql="SELECT * from prokiriksi_clean where name=:name";
  $statement = $pdoObject-&gt;prepare($sql);
  $statement-&gt;execute(array(':name' =&gt;$clean));
  $testyo=$statement-&gt;fetch();
  var_dump($testyo); //returns array
  
  if ($statement-&gt;fetch()){
    echo 'inside if'; //it is printed
    while ($record =  $statement-&gt;fetch()) {
    var_dump($record); //doesnt print
    echo 'inside while'; //doesnt print
    }
  }
  </code></pre>