title: random rowcount in PDO
body: <p>how would i get a random rowcount using PDO? i'm still learning how to use PDO so this is what i tried, but it didn't work because it doesn't randomize the quotes:</p>
  
  <pre><code>$sql = "SELECT COUNT(*) AS rows FROM thquotes;";
  
                   try {
                        $query = $this-&gt;_db-&gt;prepare($sql);
                        $query-&gt;execute();
  
                        **$rowcount = $query-&gt;rowCount();
                        $rand = rand(0,$rowcount-1);**
  
                        $sql = "SELECT cQuotes, vAuthor, cArabic, vReference 
                                FROM thquotes 
                                LIMIT $rand, 1";
  </code></pre>
  
  <p>i was using this code earlier without PDO which worked:</p>
  
  <pre><code>**$rowcount = mysql_result($result, 0, 0);
  $rand = rand(0,$rowcount-1);**
  </code></pre>