This below code is giving me mysql_fetch_array()
expects parameter
<?php
$query = $forumdb->prepare("SELECT COUNT(*) as cnt FROM smf_personal_messages");
$query->execute();
$num_rows = mysql_fetch_array($query);
if ($query->rowCount() == 0) {
echo "<tr><td colspan='6'><small>No rows found</small></td></tr>";
}
echo ($num_rows['cnt']);
?>
Warning: mysql_fetch_array() expects parameter 1 to be resource, object given in /home/gamin1/public_html/ucp/forumstats.php on line 127