Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 97 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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