classes/ezcomcomment.php
static function countContentObjectByEmail( $email, $status = false )
    {
        $statusString = "";
        if ( $status !== false )
        {
            $statusString = " AND status = $status";
        }
        $sql = "SELECT COUNT(*) as row_count FROM " .
               "( SELECT DISTINCT contentobject_id, language_id ".
               " FROM ezcomment " .
               " WHERE email='$email'" .
               "$statusString" .
               ") as contentobject";
        $db = eZDB::instance();
        $result = $db->arrayQuery( $sql );
        return $result[0]['row_count'];
    }
static function countContentObjectByEmail( $email, $status = false )
    {
        $statusString = "";
        if ( $status !== false )
        {
            $statusString = " AND status = $status";
        }
        $sql = "SELECT COUNT(*) as row_count FROM " .
               "( SELECT DISTINCT contentobject_id, language_id ".
               " FROM ezcomment " .
               " WHERE email='$email'" .
               "$statusString" .
               ") as contentobject";
        $db = eZDB::instance();
        $result = $db->arrayQuery( $sql );
        return $result[0]['row_count'];
    }
static function countContentObjectByEmail ( $ email , $ status = false ) { $ statusString = "" ; if ( $ status !== false ) { $ statusString = " AND status = $status" ; } $ sql = "SELECT COUNT(*) as row_count FROM " . "( SELECT DISTINCT contentobject_id, language_id " . " FROM ezcomment " . " WHERE email='$email'" . "$statusString" . ") as contentobject" ; $ db = eZDB :: instance ( ) ; $ result = $ db -> arrayQuery ( $ sql ) ; return $ result [ 0 ] [ 'row_count' ] ; }
Fetch the count of contentobject the user commented on
@param $email user's email
@param $status status of comment
@return count of contentobject with id.
Fetch the count of contentobject the user commented on