Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2462 Rev 2496
Line 65... Line 65...
65
	 */
65
	 */
66
	public function getStations($params) {
66
	public function getStations($params) {
67
		$json = null;
67
		$json = null;
68
		$requete =  'SELECT utm_secteur, utm_x, utm_y, wgs84_latitude AS latitude, wgs84_longitude AS longitude '.
68
		$requete =  'SELECT utm_secteur, utm_x, utm_y, wgs84_latitude AS latitude, wgs84_longitude AS longitude '.
69
			'FROM cel_obs AS co '.
69
			'FROM cel_obs AS co '.
70
			'	LEFT JOIN cel_zones_geo AS zg '.
70
			'	RIGHT JOIN cel_zones_geo AS zg '. // exclut les obs non localisées sur zone geo, pour obtenir un décompte cohérent
71
			'		ON (zg.id_zone_geo = co.ce_zone_geo) '.
71
			'		ON (zg.id_zone_geo = co.ce_zone_geo) '.
72
			"WHERE transmission = '1' ".
72
			"WHERE transmission = '1' ".
73
					$this->construireWhereDept().
73
			$this->construireWhereDept().
74
					$this->construireWhereCommune().
74
			$this->construireWhereCommune().
75
					$this->construireWherePhotosSeulement().
75
			$this->construireWherePhotosSeulement().
76
					$this->construireWhereUtilisateur().
76
			$this->construireWhereUtilisateur().
77
					$this->construireWhereNumTaxon().
77
			$this->construireWhereNumTaxon().
78
					$this->construireWhereNomTaxon().
78
			$this->construireWhereNomTaxon().
79
					$this->construireWhereDate().
79
			$this->construireWhereDate().
80
					$this->construireWhereCommentaire().
80
			$this->construireWhereCommentaire().
81
					$this->construireWhereProjet().
81
			$this->construireWhereProjet().
82
					$this->construireWhereTag();
82
			$this->construireWhereTag();
83
		//die($requete);
83
		//die($requete);
84
		$resultats = Cel::db()->requeter($requete);
84
		$resultats = Cel::db()->requeter($requete);
Line 85... Line 85...
85
 
85
 
86
		// Traitement des résultats
86
		// Traitement des résultats