Subversion Repositories eFlore/Applications.cel

Rev

Rev 1141 | Rev 2143 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1141 Rev 1331
Line 60... Line 60...
60
			
60
			
61
			if (! is_null($observations)) {
61
			if (! is_null($observations)) {
62
				$requete = 	'SELECT co.id_observation, cim.id_image '.
62
				$requete = 	'SELECT co.id_observation, cim.id_image '.
63
							'FROM cel_obs AS co '.
63
							'FROM cel_obs AS co '.
64
							'	LEFT JOIN cel_obs_images AS coi '.
64
							'	LEFT JOIN cel_obs_images AS coi '.
65
							'		ON (coi.id_observation = co.id_observation AND coi.id_utilisateur = co.ce_utilisateur) '.
65
							'		ON (coi.id_observation = co.id_observation) '.
66
							'	LEFT JOIN cel_images AS cim '.
66
							'	LEFT JOIN cel_images AS cim '.
67
							'		ON (coi.id_image = cim.id_image) '.
67
							'		ON (coi.id_image = cim.id_image) '.
Line 68... Line 68...
68
							"WHERE co.id_observation IN ($observations) ";
68
							"WHERE co.id_observation IN ($observations) ";
Line 73... Line 73...
73
				if(is_array($resultat_requete_images)) {
73
				if(is_array($resultat_requete_images)) {
74
					$infos = $resultat_requete_images;
74
					$infos = $resultat_requete_images;
75
				}
75
				}
Line 76... Line 76...
76
				
76
				
77
				foreach ($infos as $info) {
77
				foreach ($infos as $info) {
78
					if(is_numeric($info['ci_id_image'])) {
78
					if(is_numeric($info['id_image'])) {
79
						$ids[$info['id']][] = (int) $info['ci_id_image'];
79
						$ids[$info['id_observation']][] = (int) $info['id_image'];
80
					}
80
					}
81
				}
81
				}
82
			}
82
			}
83
		}
83
		}