Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 76 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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