Subversion Repositories eFlore/Applications.moissonnage

Rev

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

Rev 34 Rev 43
Line 73... Line 73...
73
		$condition = "(longitude IS NULL OR latitude IS NULL OR (longitude=0 AND latitude=0) ".
73
		$condition = "(longitude IS NULL OR latitude IS NULL OR (longitude=0 AND latitude=0) ".
74
			"OR longitude>180 OR latitude>90 OR mots_cles_texte LIKE '%sensible%')";
74
			"OR longitude>180 OR latitude>90 OR mots_cles_texte LIKE '%sensible%')";
75
		$requete =
75
		$requete =
76
		"SELECT nom_sel AS taxon, ce_zone_geo, zone_geo, station, 'floradata' AS source, ".
76
		"SELECT nom_sel AS taxon, ce_zone_geo, zone_geo, station, 'floradata' AS source, ".
77
		"IF({$condition}, wgs84_latitude, latitude) AS latitude, IF({$condition}, wgs84_longitude, longitude) ".
77
		"IF({$condition}, wgs84_latitude, latitude) AS latitude, IF({$condition}, wgs84_longitude, longitude) ".
78
		"AS longitude, IF({$condition}, 'COMMUNE', 'STATION') AS type_site ".
78
		"AS longitude, IF({$condition}, 'commune', 'station') AS type_site, ".
-
 
79
		"CONCAT(prenom_utilisateur, ' ', nom_utilisateur) AS auteur ".
79
		"FROM cel_obs  LEFT JOIN cel_zones_geo cz ON ce_zone_geo=id_zone_geo ".
80
		"FROM cel_obs  LEFT JOIN cel_zones_geo cz ON ce_zone_geo=id_zone_geo ".
80
		"WHERE transmission=1 ".
81
		"WHERE transmission=1 ".
81
		$this->construireWhereCoordonneesBbox().' '.
82
		$this->construireWhereCoordonneesBbox().' '.
82
		$this->construireWhereNomScientifique().' '.
83
		$this->construireWhereNomScientifique().' '.
83
		"ORDER BY IF({$condition},wgs84_longitude,longitude), IF({$condition},wgs84_latitude,latitude)";
84
		"ORDER BY IF({$condition},wgs84_longitude,longitude), IF({$condition},wgs84_latitude,latitude)";