Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2209 Rev 2255
Line 42... Line 42...
42
		unset($criteres['tri']);
42
		unset($criteres['tri']);
43
		$direction = (isset($criteres['dir']) && $criteres['dir']) ? $criteres['dir'] : 'ASC';
43
		$direction = (isset($criteres['dir']) && $criteres['dir']) ? $criteres['dir'] : 'ASC';
44
		unset($criteres['dir']);
44
		unset($criteres['dir']);
Line 45... Line 45...
45
 
45
 
46
		$debut = ($debut < 0) ? 0 : $debut;
46
		$debut = ($debut < 0) ? 0 : $debut;
Line 47... Line 47...
47
		$requete_recherche_images = 'SELECT * ';
47
		$requete_recherche_images = 'SELECT ci.* ';
48
 
48
 
49
		if ($this->doitJoindreTableObs($criteres)) {
49
		if ($this->doitJoindreTableObs($criteres)) {
Line 103... Line 103...
103
		return count(array_intersect(array_keys($criteres),$criteres_obs)) > 0;
103
		return count(array_intersect(array_keys($criteres),$criteres_obs)) > 0;
104
	}
104
	}
Line 105... Line 105...
105
 
105
 
Line 106... Line 106...
106
	private function fabriquerRequeteJointureObs() {
106
	private function fabriquerRequeteJointureObs() {
107
 
-
 
108
		$requete_jointure_observations = 'FROM cel_obs_images coi '.
-
 
109
			'INNER JOIN cel_obs co '.
107
 
110
				'ON coi.id_observation = co.id_observation '.
108
		$requete_jointure_observations = 'FROM cel_images ci '.
-
 
109
			'LEFT JOIN cel_obs_images coi '.
111
			'INNER JOIN cel_images ci '.
110
				'ON coi.id_image = ci.id_image '.
-
 
111
			'LEFT JOIN cel_obs co '.
Line 112... Line 112...
112
				'ON coi.id_image = ci.id_image '.
112
				'ON coi.id_observation = co.id_observation '.
113
			'WHERE co.ce_utilisateur = ci.ce_utilisateur ';
113
			'WHERE 1 ';
Line 114... Line 114...
114
 
114