Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2042 Rev 2043
Line 120... Line 120...
120
			$ids_mots_cles = $this->getIdsMotsClesObservation($observation['id_observation']);
120
			$ids_mots_cles = $this->getIdsMotsClesObservation($observation['id_observation']);
Line 121... Line 121...
121
 
121
 
122
			$ids[] = $observation['id_observation'];
122
			$ids[] = $observation['id_observation'];
123
			$mots_cles_chaine = '';
123
			$mots_cles_chaine = '';
124
			foreach ($ids_mots_cles as $id_mot_cle) {
124
			foreach ($ids_mots_cles as $id_mot_cle) {
125
				$mots_cles_chaine .= $id_mot_cle['id_mot_cle_obs'].';';
125
				$mots_cles_chaine .= $id_mot_cle['id_mot_cle'].';';
126
			}
126
			}
127
			$mots_cles_chaine = rtrim($mots_cles_chaine,';');
127
			$mots_cles_chaine = rtrim($mots_cles_chaine,';');
Line 128... Line 128...
128
			$observation['mots_cles'] = $mots_cles_chaine;
128
			$observation['mots_cles'] = $mots_cles_chaine;
Line 158... Line 158...
158
		}
158
		}
159
		return $retour;
159
		return $retour;
160
	}
160
	}
Line 161... Line 161...
161
 
161
 
162
	private function getIdsMotsClesObservation($id_observation) {
162
	private function getIdsMotsClesObservation($id_observation) {
163
		$requete_selection_mots_cles = 'SELECT DISTINCT id_mot_cle_obs '.
163
		$requete_selection_mots_cles = 'SELECT DISTINCT id_mot_cle '.
164
			'FROM cel_obs_mots_cles '.
164
			'FROM cel_mots_cles_obs_liaison '.
165
			"WHERE id_observation = $id_observation ";
165
			"WHERE id_element_lie = $id_observation ";
166
		return Cel::db()->executerRequete($requete_selection_mots_cles);
166
		return Cel::db()->executerRequete($requete_selection_mots_cles);
Line 167... Line 167...
167
	}
167
	}
168
 
168