Hi! I use a paginate feature on my website, it works great on the front page, but when I use it in the comment section I get this:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/56/6296656/html/comments.php on line 77
code:
$query = "SELECT where headm='".$_GET['chead']."' AND COUNT(*) as num FROM $tableName";
$total_pages = mysql_fetch_array(mysql_query($query));
$total_pages = $total_pages[num];
I tried adding the 'where' element into it, so it would only count those with that specific title...
'$query = "SELECT COUNT(*) as num FROM $tableName";' Gets every comment...
Why isn't the 'where' element working with it?
Thanks