Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 27 → Rev 28

/trunk/serveur/eflore_mv/modeles/macro_elements/NOM_SELECTION.php
1,54 → 1,31
<?
class NOM_SELECTION extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('radical',$this->contexteRef) and array_key_exists('rang',$this->contexteRef) )
{
$contexte['radical']= $this->contexteRef['radical'];
$contexte['rang']= $this->contexteRef['rang'];
if(!empty($contexte['radical']) and !empty($contexte['rang']) )
{ return "SELECT nom.*, intitule.eni_intitule_nom
FROM eflore_nom_intitule as intitule,
eflore_nom as nom
WHERE intitule.eni_intitule_nom like '%${contexte['radical']}%'
and nom.en_id_nom = intitule.eni_id_nom
and nom.en_ce_rang = ${contexte['rang']}
"; }
}
if (array_key_exists('radical',$this->contexteRef) )
{
$contexte['radical']= $this->contexteRef['radical'];
if(!empty($contexte['radical']) )
{ return "SELECT nom.*, intitule.eni_intitule_nom
FROM eflore_nom_intitule as intitule,
eflore_nom as nom
WHERE intitule.eni_intitule_nom like '%${contexte['radical']}%'
and nom.en_id_nom = intitule.eni_id_nom
"; }
}
return;
}
}
?>
<?php
class NOM_SELECTION extends macroElement {
function getSQL()
{
$contexte = array();
if (array_key_exists('radical',$this->contexteRef) and array_key_exists('rang',$this->contexteRef) ) {
$contexte['radical']= $this->contexteRef['radical'];
$contexte['rang']= $this->contexteRef['rang'];
if(!empty($contexte['radical']) and !empty($contexte['rang']) ) {
return
'SELECT nom.*, intitule.eni_intitule_nom
FROM eflore_nom_intitule as intitule, eflore_nom as nom
WHERE intitule.eni_intitule_nom like "%'.$contexte['radical'].'%"
AND nom.en_id_nom = intitule.eni_id_nom
AND nom.en_ce_rang = '.$contexte['rang'];
}
}
if (array_key_exists('radical',$this->contexteRef) ) {
$contexte['radical']= $this->contexteRef['radical'];
if(!empty($contexte['radical']) ) {
return
'SELECT nom.*, intitule.eni_intitule_nom
FROM eflore_nom_intitule as intitule, eflore_nom as nom
WHERE intitule.eni_intitule_nom like "%'.$contexte['radical'].'%"
AND nom.en_id_nom = intitule.eni_id_nom';
}
}
return null;
}
}
?>