Subversion Repositories eFlore/Applications.cel

Rev

Rev 1512 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1512 Rev 1527
Line 80... Line 80...
80
	*
80
	*
81
	* @param array $ids_element_lies
81
	* @param array $ids_element_lies
82
	* @return array
82
	* @return array
83
	*/
83
	*/
84
	public function obtenirChampsEtendusPourElementsMultiples($ids_element_lies) {
84
	public function obtenirChampsEtendusPourElementsMultiples($ids_element_lies) {
85
		
-
 
86
		$ids_element_lies = array_map(array($this, 'proteger'),$ids_element_lies);
-
 
87
		
-
 
88
		$requete = "SELECT * FROM ".$this->table_champs_etendus." ".
-
 
89
							"WHERE ".$this->champ_id." IN (".implode(',',$ids_element_lies).") ";
-
 
90
 
-
 
91
		$resultats = $this->executerRequete($requete);
-
 
92
		
-
 
93
		$champs_etendus_par_element = array();
85
		$champs_etendus_par_element = array();
-
 
86
		if(!empty($ids_element_lies)) {
-
 
87
			$ids_element_lies = array_map(array($this, 'proteger'),$ids_element_lies);
94
		
88
			
-
 
89
			$requete = "SELECT * FROM ".$this->table_champs_etendus." ".
-
 
90
								"WHERE ".$this->champ_id." IN (".implode(',',$ids_element_lies).") ";
-
 
91
	
-
 
92
			$resultats = $this->executerRequete($requete);
-
 
93
			
-
 
94
			$champs_etendus_par_element = array();
-
 
95
			
95
		foreach ($resultats as &$ligne) {
96
			foreach ($resultats as &$ligne) {
96
			$id_element = $ligne[$this->champ_id];
97
				$id_element = $ligne[$this->champ_id];
97
			if(!isset($champs_etendus_par_element[$id_element])) {
98
				if(!isset($champs_etendus_par_element[$id_element])) {
98
				$champs_etendus_par_element[$id_element] = array();
99
					$champs_etendus_par_element[$id_element] = array();
-
 
100
				}
-
 
101
				$champs_etendus_par_element[$id_element][$ligne['cle']] = $ligne['valeur'];
99
			}
102
			}
100
			$champs_etendus_par_element[$id_element][$ligne['cle']] = $ligne['valeur'];
-
 
101
		}
103
		}
Line 102... Line 104...
102
		
104
		
103
		return $champs_etendus_par_element;
105
		return $champs_etendus_par_element;