public static function getAllAdministratorGroups($searchText = "", $listOrder = "") { $administratorGroupData = new ExtranetGroups(); $select = $administratorGroupData->select()->setIntegrityCheck(false)->from('Extranet_Groups')->join('Extranet_GroupsIndex', 'Extranet_GroupsIndex.EGI_GroupID = Extranet_Groups.EG_ID')->where('Extranet_GroupsIndex.EGI_LanguageID = ?', Zend_Registry::get("languageID"))->where('EG_ID > 1'); /* search */ if ($searchText != "") { $select->Where("Extranet_GroupsIndex.EGI_Name LIKE '%" . $searchText . "%'"); } /* order */ if ($listOrder != "") { $select->order($listOrder); } $select->order('EGI_Name'); return $administratorGroupData->fetchAll($select); }