Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 1119 → Rev 1120

/trunk/services/modules/0.1/cel/Images.php
228,10 → 228,10
$refTax = $this->parametres['referentiel'];
$numNom = $this->Bdd->proteger($this->ref_tax_demande[$refTax][0]);
 
$requete = 'SELECT coi.id_image AS id_image '.
'FROM cel_obs_images AS coi '.
$requete = 'SELECT ci.id_image AS id_image '.
'FROM cel_images AS ci '.
' LEFT JOIN cel_obs AS co '.
'ON (coi.id_observation = co.id_observation) '.
'ON (ci.ce_observation = co.id_observation) '.
'WHERE co.transmission = 1 '.
" AND co.nom_ret_nn IN ($numNom)";
" AND co.nom_referentiel = ".$this->Bdd->proteger($refTax) . ' -- ' . __FILE__ . ':' . __LINE__;
253,14 → 253,13
$numNom = $this->Bdd->proteger($this->ref_tax_demande[$refTax][0]);
$requete = 'SELECT ci.id_image AS id_image '.
'FROM cel_images AS ci'.
' LEFT JOIN cel_obs_images AS coi '.
' ON (coi.id_image = ci.id_image) '.
' LEFT JOIN cel_obs AS co '.
' ON (coi.id_observation = co.id_observation) '.
' ON (ci.ce_observation = co.id_observation) '.
'WHERE co.transmission = 1 '.
" AND co.nom_ret_nn IN ($numNom) ".
' AND ci.date_prise_de_vue != "0000-00-00" ORDER BY ci.date_prise_de_vue ASC '.
' AND co.nom_referentiel LIKE '.$this->proteger($refTax.'%').' '.
' AND ci.date_prise_de_vue != "0000-00-00" '.
' AND co.nom_referentiel LIKE '.$this->Bdd->proteger($refTax.'%').' '.
' ORDER BY ci.date_prise_de_vue ASC '.
'LIMIT 1' . ' -- ' . __FILE__ . ':' . __LINE__;
 
$resultat = $this->Bdd->recupererTous($requete);
283,10 → 282,8
' nom_sel, nom_sel_nn, '.
' zone_geo, ce_zone_geo, lieudit, station, milieu '.
'FROM cel_images AS ci'.
' LEFT JOIN cel_obs_images AS coi '.
' ON (coi.id_image = ci.id_image) '.
' LEFT JOIN cel_obs AS co '.
' ON (coi.id_observation = co.id_observation) '.
' ON (ci.ce_observation = co.id_observation) '.
'WHERE ci.id_image = '.$this->ressources[0].
' AND co.id_observation IS NOT NULL' . ' -- ' . __FILE__ . ':' . __LINE__;
 
307,10 → 304,8
' ci.id_image AS id_img, co.date_observation AS date '.
(isset($this->parametres['retour.champs']) ? ', '.$this->parametres['retour.champs'] : '').
'FROM cel_images AS ci'.
' LEFT JOIN cel_obs_images AS coi '.
' ON (coi.id_image = ci.id_image) '.
' LEFT JOIN cel_obs AS co '.
' ON (coi.id_observation = co.id_observation) '.
' ON (ci.ce_observation = co.id_observation) '.
$this->formerRequeteConditions($numNomListe).' '.
'GROUP BY id_img '.
$this->formerRequeteTri().