
I add at line 69 ( com_status = 2 ) to get the active comments only but my code isn´t working.
Who can help me ?
function tabComments($uids) {
global $xoopsDB, $periodej;
$module_handler = xoops_gethandler("module");
$pdmodule = $module_handler->getByDirname("PDdownloads");
$sql = "SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_uid='$uids' AND com_created > '$periodej' AND com_status = '2'";
if (is_object($pdmodule)) {
$sql .= " AND com_modid=".$pdmodule->getVar('mid');
}
list($comb) = $xoopsDB->fetchRow($xoopsDB->query($sql));
$abacus = $comb;
return $abacus;
}