function enumerate() { // like select but with fixed order $this->myLogger->enter(); // evaluate search criteria for query $q = http_request("q", "s", ""); $where = "1"; $fedstr = "1"; if ($this->curFederation != null) { $fed = intval($this->curFederation->get('ID')); $mask = 1 << $fed; $this->myLogger->trace("Jueces: fed:{$this->curFederation->get('ID')} mask:{$mask}"); $intlmask = Federations::getInternationalMask(); $fedstr = $this->curFederation->isInternational() ? "((Internacional!=0) OR (Federations & {$intlmask})!=0)" : "((Federations & {$mask})!=0)"; } if ($q !== "") { $where = "( Nombre LIKE '%" . $q . "%' )"; } $result = $this->__select("*", "Jueces", "{$where} AND {$fedstr}", "Nombre ASC", ""); $this->myLogger->leave(); return $result; }
/** * return a dupla ID Nombre,Provincia list according select and federation criteria * return data if success; null on error */ function enumerate() { $this->myLogger->enter(); // evaluate search query string $q = http_request("q", "s", ""); // evaluate federation for club/country filtering $fedstr = "1"; if ($this->curFederation != null) { $fed = intval($this->curFederation->get('ID')); $mask = 1 << $fed; $intlmask = Federations::getInternationalMask(); $fedstr = $this->curFederation->isInternational() ? "((Federations & {$intlmask})!=0)" : "((Federations & {$mask})!=0)"; } $where = "1"; if ($q !== "") { $where = "( Nombre LIKE '%" . $q . "%' )"; } $result = $this->__select("ID,Nombre,Provincia,Pais,Federations", "Clubes", "{$fedstr} AND {$where}", "Nombre ASC", ""); $this->myLogger->leave(); return $result; }