PDO Problem. Execute arguments not being read?
<p>Here is my function to return the most popular videos. For some reason it don't acknowledge the :limit. If I remove ':limit' and implicitly put in the number 10 it works.</p>

<p>Method:</p>

<pre><code>function getPopularVideos($limit) {
$dbc = connectToDatabase();
$q = $dbc-&gt;prepare('SELECT * FROM video ORDER BY views DESC LIMIT 0, :limit');
$q-&gt;execute(array(':limit' =&gt; $limit));
return $q-&gt;fetchAll(PDO::FETCH_ASSOC);
}
</code></pre>

<p>Calling code:</p>

<pre><code>$popularVideos = getPopularVideos(10);
</code></pre>

<p>Any idea's what I'm doing wrong. Little confused.</p>
