Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

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

Rev Author Line No. Line
83 jpm 1
<?php
2
class VERNACULAIRE_NOMS extends macroElement {
3
    function getSQL()
4
    {
5
        $contexte = array();
6
        if (array_key_exists('nvp', $this->contexteRef) and array_key_exists('nt', $this->contexteRef)) {
7
            $contexte['nvp'] = $this->contexteRef['nvp'];
8
            $contexte['nt'] = $this->contexteRef['nt'];
97 jpm 9
            if ($contexte['nvp'] != '' AND $contexte['nt'] != '' ) {
83 jpm 10
                return
11
                'SELECT DISTINCT
12
                vernaculaire.ev_intitule_nom_vernaculaire,
13
                vernaculaire.ev_notes_nom_vernaculaire,
14
                eflore_genre_nombre.elv_id_valeur_lg AS egn_id_genre_nombre,
15
                eflore_genre_nombre.elv_intitule_valeur_lg AS egn_intitule,
16
                eflore_genre_nombre.elv_abreviation_valeur_lg AS egn_abreviation,
17
                eflore_genre_nombre.elv_description_valeur_lg AS egn_description,
18
                langue.el_nom_langue_principal,
19
                langue.el_code_langue,
20
                conseil.evce_id_emploi,
21
                conseil.evce_intitule_conseil_emlploi,
22
                conseil.evce_abreviation_conseil_emploi,
23
                conseil.evce_description_conseil_emploi,
24
                attribution.eva_commentaires_geographiques,
25
                attribution.eva_mark_info_biblio,
26
                citation.enci_intitule_complet_citation,
27
                attribution.eva_notes_emploi_nom_vernaculaire,
28
                contributeur.epc_nom_principal,
29
                contributeur.epc_courriel_principal,
30
                zg.ezg_intitule_principal_zg,
31
                zg.ezg_code_zg,
32
                zg.ezg_notes_zone_geo
33
 
34
 
35
                FROM
36
                eflore_vernaculaire_attribution AS attribution,
37
                eflore_vernaculaire AS vernaculaire,
38
                eflore_vernaculaire_conseil_emploi AS conseil,
39
                eflore_nom_citation AS citation,
40
                eflore_langue_valeur AS eflore_genre_nombre,
41
                eflore_personne_contributeur AS contributeur,
42
                eflore_langue AS langue,
43
                eflore_zg AS zg
44
 
45
                WHERE
46
                attribution.eva_id_version_projet_taxon_ref = '.$contexte['nvp'].'
47
                AND attribution.eva_id_taxon_ref = '.$contexte['nt'].'
48
                AND attribution.eva_id_nom_vernaculaire = vernaculaire.ev_id_nom_vernaculaire
49
                AND attribution.eva_ce_emploi = conseil.evce_id_emploi
50
                AND vernaculaire.ev_ce_categorie_genre_nombre = eflore_genre_nombre.elv_id_categorie_lg
51
                AND vernaculaire.ev_ce_valeur_genre_nombre = eflore_genre_nombre.elv_id_valeur_lg
52
                AND attribution.eva_ce_citation_biblio = citation.enci_id_citation
53
                AND attribution.eva_ce_contributeur = contributeur.epc_id_contributeur
54
                AND vernaculaire.ev_ce_langue = langue.el_id_langue
55
                AND vernaculaire.ev_ce_version_projet_langue = langue.el_id_version_projet_langue
56
                AND attribution.eva_ce_zone_geo = zg.ezg_id_zone_geo
181 jp_milcent 57
                AND attribution.eva_ce_version_projet_zg = zg.ezg_id_version_projet_zg
58
 
59
					ORDER BY zg.ezg_code_zg ASC';
83 jpm 60
            }
61
        }
62
        return null;
63
    }
64
}
65
?>