06-May-2014, 11:49 PM
After upgrding to 2.5 I'm getting an error access denied when trying to pull the comment count using the following code which worked in the previous version. Thanks.
define('IN_COMMENTICS', '1');
require_once "includes/db/connect.php";
$page_q = mysql_query ("SELECT c.page_id, p.url, p.id FROM comments c INNER JOIN pages p ON p.url = '$url' AND c.page_id = p.id AND is_approved != 0 ")or die (mysql_error());
$comcount = mysql_num_rows($page_q);
define('IN_COMMENTICS', '1');
require_once "includes/db/connect.php";
$page_q = mysql_query ("SELECT c.page_id, p.url, p.id FROM comments c INNER JOIN pages p ON p.url = '$url' AND c.page_id = p.id AND is_approved != 0 ")or die (mysql_error());
$comcount = mysql_num_rows($page_q);