public function getOrganizationsByCode($code = null)
    {
        if (is_null($code)) {
            return $this->getOrganizations();
        }

        $sql = "SELECT gor_id_organization, gor_name
                    FROM gems__organizations
                    WHERE gor_active = 1 and gor_code = ?
                    ORDER BY gor_name";
        return $this->_getSelectPairsCached(__FUNCTION__ . '_' . $code, $sql, $code, 'organizations', 'natsort');
    }
public function getOrganizationsByCode($code = null)
    {
        if (is_null($code)) {
            return $this->getOrganizations();
        }

        $sql = "SELECT gor_id_organization, gor_name
                    FROM gems__organizations
                    WHERE gor_active = 1 and gor_code = ?
                    ORDER BY gor_name";
        return $this->_getSelectPairsCached(__FUNCTION__ . '_' . $code, $sql, $code, 'organizations', 'natsort');
    }
public function getOrganizationsByCode ( $ code = null ) { if ( is_null ( $ code ) ) { return $ this -> getOrganizations ( ) ; } $ sql = "SELECT gor_id_organization, gor_name
                    FROM gems__organizations
                    WHERE gor_active = 1 and gor_code = ?
                    ORDER BY gor_name" ; return $ this -> _getSelectPairsCached ( __FUNCTION__ . '_' . $ code , $ sql , $ code , 'organizations' , 'natsort' ) ; }
Get all organizations that share a given code

On empty this will return all organizations

@param string $code
@return array key = gor_id_organization, value = gor_name
Get all organizations that share a given code