Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
class NOM_SELECTION_PROJETS extends macroElement {
    function getSQL()
    {
        $contexte = array();
        if (array_key_exists('nn', $this->contexteRef)) {
            $contexte['nn'] = $this->contexteRef['nn'];
            if (!empty($contexte['nn'])) {
                return 
                'SELECT DISTINCT 
                nom.en_id_nom,
                version.eprv_id_version,
                version.eprv_nom,
                projet.epr_intitule_projet,
                projet.epr_abreviation_projet
                
                FROM 
                eflore_nom AS nom,
                eflore_selection_nom AS selection,
                eflore_taxon AS taxon,
                eflore_projet_version AS version,
                eflore_projet AS projet
                
                WHERE 
                nom.en_id_nom = '.$contexte['nn'].' 
                AND nom.en_id_nom = selection.esn_id_nom 
                AND selection.esn_id_taxon = taxon.et_id_taxon 
                AND selection.esn_id_version_projet_taxon = taxon.et_id_version_projet_taxon 
                AND taxon.et_id_version_projet_taxon = version.eprv_id_version 
                AND version.eprv_ce_projet = projet.epr_id_projet
                AND version.eprv_date_fin_version IS NULL 
                AND projet.epr_mark_projet_consultable = 1
                ORDER BY version.eprv_nom ASC';
            }
        }
        return null;
    }
}
?>