Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 97 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
class VERNACULAIRE_NOMS extends macroElement {
    function getSQL()
    {
        $contexte = array();
        if (array_key_exists('nvp', $this->contexteRef) and array_key_exists('nt', $this->contexteRef)) {
            $contexte['nvp'] = $this->contexteRef['nvp'];
            $contexte['nt'] = $this->contexteRef['nt'];
            if ($contexte['nvp'] != '' AND $contexte['nt'] != '' ) {
                return 
                'SELECT DISTINCT 
                vernaculaire.ev_intitule_nom_vernaculaire,
                vernaculaire.ev_notes_nom_vernaculaire,
                eflore_genre_nombre.elv_id_valeur_lg AS egn_id_genre_nombre,
                eflore_genre_nombre.elv_intitule_valeur_lg AS egn_intitule,
                eflore_genre_nombre.elv_abreviation_valeur_lg AS egn_abreviation,
                eflore_genre_nombre.elv_description_valeur_lg AS egn_description,
                langue.el_nom_langue_principal,
                langue.el_code_langue,
                conseil.evce_id_emploi,
                conseil.evce_intitule_conseil_emlploi,
                conseil.evce_abreviation_conseil_emploi,
                conseil.evce_description_conseil_emploi,
                attribution.eva_commentaires_geographiques,
                attribution.eva_mark_info_biblio,
                citation.enci_intitule_complet_citation,
                attribution.eva_notes_emploi_nom_vernaculaire,
                contributeur.epc_nom_principal,
                contributeur.epc_courriel_principal,
                zg.ezg_intitule_principal_zg,
                zg.ezg_code_zg,
                zg.ezg_notes_zone_geo
                
                
                FROM 
                eflore_vernaculaire_attribution AS attribution,
                eflore_vernaculaire AS vernaculaire,
                eflore_vernaculaire_conseil_emploi AS conseil,
                eflore_nom_citation AS citation,
                eflore_langue_valeur AS eflore_genre_nombre,
                eflore_personne_contributeur AS contributeur,
                eflore_langue AS langue,
                eflore_zg AS zg
                
                WHERE 
                attribution.eva_id_version_projet_taxon_ref = '.$contexte['nvp'].' 
                AND attribution.eva_id_taxon_ref = '.$contexte['nt'].' 
                AND attribution.eva_id_nom_vernaculaire = vernaculaire.ev_id_nom_vernaculaire 
                AND attribution.eva_ce_emploi = conseil.evce_id_emploi 
                AND vernaculaire.ev_ce_categorie_genre_nombre = eflore_genre_nombre.elv_id_categorie_lg 
                AND vernaculaire.ev_ce_valeur_genre_nombre = eflore_genre_nombre.elv_id_valeur_lg 
                AND attribution.eva_ce_citation_biblio = citation.enci_id_citation 
                AND attribution.eva_ce_contributeur = contributeur.epc_id_contributeur
                AND vernaculaire.ev_ce_langue = langue.el_id_langue 
                AND vernaculaire.ev_ce_version_projet_langue = langue.el_id_version_projet_langue
                AND attribution.eva_ce_zone_geo = zg.ezg_id_zone_geo 
                AND attribution.eva_ce_version_projet_zg = zg.ezg_id_version_projet_zg 
                
                                        ORDER BY zg.ezg_code_zg ASC';
            }
        }
        return null;
    }
}
?>