Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2939 Rev 3509
Line 76... Line 76...
76
 
76
 
77
		if (isset($_GET['obsId'])) {
77
		if (isset($_GET['obsId'])) {
Line 78... Line 78...
78
			$observations = $this->traiterValeursMultiples($_GET['obsId']);
78
			$observations = $this->traiterValeursMultiples($_GET['obsId']);
79
 
79
 
80
			if (! is_null($observations)) {
80
			if (! is_null($observations)) {
81
				$requete = 	'SELECT ce_observation, id_image '.
81
				$requete = 	'SELECT occurrence_id as ce_observation, id as id_image '.
Line 82... Line 82...
82
							'FROM cel_images '.
82
							'FROM photo '.
Line 83... Line 83...
83
							"WHERE ce_observation IN ($observations) ";
83
							"WHERE occurrence_id IN ($observations) ";
84
 
84
 
Line 112... Line 112...
112
			$idsImages = array_unique($idsImages);
112
			$idsImages = array_unique($idsImages);
113
		} elseif (!empty($_GET['ids-obs'])) { // par obs
113
		} elseif (!empty($_GET['ids-obs'])) { // par obs
114
			$idsObs = explode(',', $_GET['ids-obs']);
114
			$idsObs = explode(',', $_GET['ids-obs']);
115
			$idsObs = array_unique($idsObs);
115
			$idsObs = array_unique($idsObs);
116
			// get id images selon id obs
116
			// get id images selon id obs
117
			$req = "SELECT DISTINCT id_image FROM cel_images WHERE ce_observation IN (";
117
			$req = "SELECT DISTINCT id as id_image FROM photo WHERE occurrence_id IN (";
118
			$req .= implode(',', $idsObs);
118
			$req .= implode(',', $idsObs);
119
			$req .= ");";
119
			$req .= ");";
120
			//var_dump($req);
120
			//var_dump($req);
121
			$resultats = Cel::db()->requeter($req);
121
			$resultats = Cel::db()->requeter($req);
122
			//var_dump($resultats);
122
			//var_dump($resultats);