Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 76 | Details | Compare with Previous | 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,
85 jpm 19
                statut.esns_id_statut,
76 jpm 20
                statut.esns_intitule_statut,
21
                statut.esns_abreviation_intitule_statut,
22
                statut.esns_description_statut,
23
                taxon.et_id_taxon
24
 
25
                FROM
26
                eflore_nom AS nom,
27
                eflore_selection_nom AS selection,
28
                eflore_selection_nom_statut AS statut,
29
                eflore_taxon AS taxon
30
 
31
                WHERE
32
                selection.esn_id_taxon = '.$contexte['nt'].'
33
                AND selection.esn_id_version_projet_taxon = '.$contexte['nvp'].'
34
                AND selection.esn_ce_statut = statut.esns_id_statut
35
                AND selection.esn_id_nom = nom.en_id_nom
36
                AND selection.esn_id_taxon = taxon.et_id_taxon';
37
            }
38
        }
39
        return null;
40
    }
41
}
42
?>