original_string: 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'];
      }
code: 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'];
      }
code_tokens: 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' ] ; }
docstring: 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.
docstring_tokens: Fetch the count of contentobject the user commented on