121,6 → 121,7 |
"WHERE transmission = '1' ". |
$this->standard. |
" AND (". |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()). |
$this->construireWhereRectangleStationOR()." OR ". |
$this->construireWhereRectangleCommuneOR().") ". |
$this->construireWhereDept(). |
162,6 → 163,7 |
"WHERE transmission = '1' ". |
$this->standard. |
" AND (". |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()). |
$this->construireWhereRectangleStationOR()." OR ". |
$this->construireWhereRectangleCommuneOR().") ". |
$this->construireWhereDept(). |
979,7 → 981,7 |
private function construireWherePhotosSeulement() { |
$sql = ''; |
if (isset($this->parametres['photos']) && $this->parametres['photos'] == 1) { |
$sql = 'AND co.id_observation IN (SELECT DISTINCT ce_observation FROM cel_images) '; |
$sql = 'AND co.id_observation IN (SELECT DISTINCT ce_observation FROM cel_images_export) '; |
} |
return $sql; |
} |
1146,9 → 1148,9 |
if (isset($tag) && !$this->etreNull($tag)) { |
$tag_sql = $this->getSqlWhereMotsCles($tag); |
// Construction de la requĂȘte |
$requete = 'SELECT DISTINCT co.id_observation AS id_obs, ci.ce_utilisateur AS utilisateur '. |
'FROM photo ci'. |
' INNER JOIN cel_obs AS co '. |
$requete = 'SELECT DISTINCT co.id_observation AS id_obs, co.ce_utilisateur AS utilisateur '. |
'FROM cel_images_export ci'. |
' INNER JOIN cel_export_total AS co '. |
' ON (ci.ce_observation = co.id_observation) '. |
' LEFT JOIN cel_zones_geo AS zg '. |
" ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) ". |