title: Using PDO and MySql instead of mysqli
body: <p>I'm starting using <code>PDO</code> and <code>MySQL</code> instead of <code>mysqli</code>.
  So, i try to define this simple function:</p>
  
  <pre><code>public function getIntro($table) {
              $stmt = $this-&gt;db-&gt;prepare("SELECT * FROM $table ORDER BY rand() LIMIT ?");
              $stmt-&gt;execute(array(6));
              return $stmt-&gt;fetchAll(PDO::FETCH_ASSOC);
          }
  </code></pre>
  
  <p>But, in doing so, the function return an empty array. Considering that the connection with the db work correctly, where is the error?</p>
  
  <p>Thanks</p>