Blame | Last modification | View Log | RSS feed
<?php
class TAXON_SUPERIEUR extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('nvp', $this->contexteRef) and array_key_exists('nt', $this->contexteRef)) {
$contexte['nvp'] = $this->contexteRef['nvp'];
$contexte['nt'] = $this->contexteRef['nt'];
if (!empty($contexte['nvp']) && !empty($contexte['nt'])) {
$requete =
'SELECT DISTINCT
nom.en_id_nom,
nom.en_ce_rang,
relation.etr_id_version_projet_taxon_2,
relation.etr_id_taxon_2
FROM
eflore_nom AS nom,
eflore_selection_nom AS selection,
eflore_taxon_relation AS relation
WHERE
nom.en_id_nom = selection.esn_id_nom
AND selection.esn_ce_statut = 3
AND selection.esn_id_version_projet_taxon = relation.etr_id_version_projet_taxon_2
AND selection.esn_id_taxon = relation.etr_id_taxon_2
AND relation.etr_id_version_projet_taxon_1 = '.$contexte['nvp'].'
AND relation.etr_id_taxon_1 = '.$contexte['nt'].'
AND relation.etr_id_categorie_taxon = 3
AND relation.etr_id_valeur_taxon = 3 ';
return $requete;
}
}
return null;
}
}
?>