Line 55... |
Line 55... |
55 |
public function recupererStationsFloradata() {
|
55 |
public function recupererStationsFloradata() {
|
56 |
$this->bdd->requeter("USE ".Config::get('bdd_nom_floradata'));
|
56 |
$this->bdd->requeter("USE ".Config::get('bdd_nom_floradata'));
|
57 |
$requete =
|
57 |
$requete =
|
58 |
"SELECT DISTINCTROW zone_geo AS commune, Date(date_observation) AS date, Floor(wgs84_latitude*10)/10 AS lat, ".
|
58 |
"SELECT DISTINCTROW zone_geo AS commune, Date(date_observation) AS date, Floor(wgs84_latitude*10)/10 AS lat, ".
|
59 |
"Floor(wgs84_longitude*10)/10 AS lng, courriel_utilisateur AS auteur ".
|
59 |
"Floor(wgs84_longitude*10)/10 AS lng, courriel_utilisateur AS auteur ".
|
60 |
"FROM cel_obs LEFT JOIN cel_zones_geo cz ON ce_zone_geo=id_zone_geo ".
|
60 |
"FROM cel_export_total LEFT JOIN cel_zones_geo cz ON ce_zone_geo=id_zone_geo ".
|
61 |
"WHERE ".$this->construireWhereTaxonFloradata()." AND transmission=1 AND nom_referentiel = '".Config::get('referentielsDispo')."' AND ".
|
61 |
"WHERE ".$this->construireWhereTaxonFloradata()." AND transmission=1 AND nom_referentiel = '".Config::get('referentielsDispo')."' AND ".
|
62 |
"wgs84_longitude BETWEEN ".$this->limitesCarte['ouest']." AND ".$this->limitesCarte['est']." ".
|
62 |
"wgs84_longitude BETWEEN ".$this->limitesCarte['ouest']." AND ".$this->limitesCarte['est']." ".
|
63 |
"AND wgs84_latitude BETWEEN ".$this->limitesCarte['sud']." AND ".$this->limitesCarte['nord']." ".
|
63 |
"AND wgs84_latitude BETWEEN ".$this->limitesCarte['sud']." AND ".$this->limitesCarte['nord']." ".
|
64 |
"AND date_observation<>'0000-00-00 00-00-00' ORDER BY lat DESC, lng ASC, commune, date";
|
64 |
"AND date_observation<>'0000-00-00 00-00-00' ORDER BY lat DESC, lng ASC, commune, date";
|
65 |
$stations = $this->bdd->recupererTous($requete);
|
65 |
$stations = $this->bdd->recupererTous($requete);
|