Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
27 jpm 1
<?
2
 
3
 
4
 
5
 
6
 
7
		class NOM_SELECTION extends macroElement {
8
 
9
 
10
			function getSQL()
11
			{
12
				$contexte = array();
13
 
14
	  			if (array_key_exists('radical',$this->contexteRef) and array_key_exists('rang',$this->contexteRef) )
15
	  			{
16
 
17
					$contexte['radical']= $this->contexteRef['radical'];
18
 
19
					$contexte['rang']= $this->contexteRef['rang'];
20
 
21
	  				if(!empty($contexte['radical']) and !empty($contexte['rang']) )
22
	  				{	return "SELECT nom.*, intitule.eni_intitule_nom
23
				 FROM eflore_nom_intitule as intitule,
24
				 	  eflore_nom as nom
25
				 WHERE intitule.eni_intitule_nom like '%${contexte['radical']}%'
26
				 and nom.en_id_nom = intitule.eni_id_nom
27
				 and nom.en_ce_rang = ${contexte['rang']}
28
			";  }
29
	  			}
30
 
31
	  			if (array_key_exists('radical',$this->contexteRef) )
32
	  			{
33
 
34
					$contexte['radical']= $this->contexteRef['radical'];
35
 
36
	  				if(!empty($contexte['radical']) )
37
	  				{	return "SELECT nom.*, intitule.eni_intitule_nom
38
				 FROM eflore_nom_intitule as intitule,
39
				 	  eflore_nom as nom
40
				 WHERE intitule.eni_intitule_nom like '%${contexte['radical']}%'
41
				 and nom.en_id_nom = intitule.eni_id_nom
42
			";  }
43
	  			}
44
 
45
				return;
46
			}
47
 
48
 
49
 
50
		}
51
 
52
 
53
?>
54