Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
76 jpm 1
<?php
2
class TAXON_NOMS extends macroElement {
3
    function getSQL()
4
    {
5
        $contexte = array();
6
        if (array_key_exists('nt', $this->contexteRef) and array_key_exists('nvp', $this->contexteRef)) {
7
 
8
            $contexte['nt'] = $this->contexteRef['nt'];
9
            $contexte['nvp'] = $this->contexteRef['nvp'];
10
            if (!empty($contexte['nt']) && !empty($contexte['nvp'])) {
11
                return
12
                'SELECT DISTINCT
13
                nom.en_id_nom,
14
                selection.esn_code_numerique_1,
15
                selection.esn_code_numerique_2,
16
                selection.esn_code_alphanumerique_1,
17
                selection.esn_code_alphanumerique_2,
18
                selection.esn_commentaire_nomenclatural,
19
                statut.esns_intitule_statut,
20
                statut.esns_abreviation_intitule_statut,
21
                statut.esns_description_statut,
22
                taxon.et_id_taxon
23
 
24
                FROM
25
                eflore_nom AS nom,
26
                eflore_selection_nom AS selection,
27
                eflore_selection_nom_statut AS statut,
28
                eflore_taxon AS taxon
29
 
30
                WHERE
31
                selection.esn_id_taxon = '.$contexte['nt'].'
32
                AND selection.esn_id_version_projet_taxon = '.$contexte['nvp'].'
33
                AND selection.esn_ce_statut = statut.esns_id_statut
34
                AND selection.esn_id_nom = nom.en_id_nom
35
                AND selection.esn_id_taxon = taxon.et_id_taxon';
36
            }
37
        }
38
        return null;
39
    }
40
}
41
?>