Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 1105 Rev 1106
Line 147... Line 147...
147
	}
147
	}
Line 148... Line 148...
148
 
148
 
149
	protected function construireWhere() {
149
	protected function construireWhere() {
150
		$where = "";
150
		$where = "";
-
 
151
		$conditions = array();
-
 
152
		// élimination des entrées sans nn valide
-
 
153
		$conditions[] = "CAST(num_nom AS decimal) != 0";
151
		$conditions = array();
154
		// masque
152
		if(!empty($this->masque)) {
155
		if(!empty($this->masque)) {
153
			if(isset($this->masque['nom'])) {
156
			if(isset($this->masque['nom'])) {
154
				$masqueNom = $this->getBdd()->proteger($this->masque['nom']);
157
				$masqueNom = $this->getBdd()->proteger($this->masque['nom']);
155
				$conditions[] = "nom_sci LIKE $masqueNom";
158
				$conditions[] = "nom_sci LIKE $masqueNom";
156
			}
159
			}
157
			if(isset($this->masque['zone-geo'])) {
160
			if(isset($this->masque['zone-geo'])) {
158
				$masqueZg = $this->masque['zone-geo'];
161
				$masqueZg = $this->masque['zone-geo'];
159
				$conditions[] = "`$masqueZg` in ('1', '1?')";
162
				$conditions[] = "`$masqueZg` in ('1', '1?')";
160
			}
-
 
161
			$where = " WHERE ".implode(' AND ', $conditions);
163
			}
-
 
164
		}
162
		}
165
		$where = " WHERE " . implode(' AND ', $conditions);
163
		return $where;
166
		return $where;
164
	}
167
	}
165
}
168
}
166
?>
169
?>