111,7 → 111,7 |
$this->construireWhereDept(). |
$this->construireWhereCommune(). |
$this->construireWhereUtilisateur(). |
$this->construireWhereNumTaxon(). |
$this->construireWhereNumTaxonAvecSousTaxons(). |
$this->construireWhereNomTaxon(). |
$this->construireWhereReferentiel(). |
$this->construireWhereDate(). |
148,7 → 148,7 |
$this->construireWhereDept(). |
$this->construireWhereCommune(). |
$this->construireWhereUtilisateur(). |
$this->construireWhereNumTaxon(). |
$this->construireWhereNumTaxonAvecSousTaxons(). |
$this->construireWhereNomTaxon(). |
$this->construireWhereReferentiel(). |
$this->construireWhereDate(). |
157,7 → 157,7 |
$this->construireWhereProjet(). |
$this->construireWhereTag(). |
$this->construireWhereNombreDeJours(); |
//echo $requete;exit; |
|
$resultats_nb_obs = $this->executerRequete($requete); |
return $resultats_nb_obs[0]['nb']; |
} |
332,7 → 332,7 |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()). |
$this->construireWhereDept(). |
$this->construireWhereUtilisateur(). |
$this->construireWhereNumTaxon(). |
$this->construireWhereNumTaxonAvecSousTaxons(). |
$this->construireWhereNomTaxon(). |
$this->construireWhereReferentiel(). |
$this->construireWhereDate(). |
957,6 → 957,7 |
return $sql; |
} |
|
|
private function construireWhereNumTaxon() { |
$sql = ''; |
// Récupération des coordonnées depuis l'id station |
968,6 → 969,40 |
return $sql; |
} |
|
private function construireWhereNumTaxonAvecSousTaxons() { |
$sql = ''; |
// Récupération des coordonnées depuis l'id station |
extract($this->parametres); |
if (isset($this->parametres['num_taxon']) && !$this->etreNull($num_taxon)) { |
$sous_taxons = $this->obtenirSousTaxons($this->parametres['num_taxon']); |
$num_taxon = $this->proteger($num_taxon); |
if(!empty($sous_taxons)) { |
$sql_in_sous_tax = implode(',', $sous_taxons); |
$sql = " AND (nt = $num_taxon OR ". |
"nom_sel_nn IN (".$sql_in_sous_tax.") OR ". |
"nom_ret_nn IN (".$sql_in_sous_tax.") ". |
") "; |
} |
else { |
$sql = " AND nt = $num_taxon "; |
} |
} |
return $sql; |
} |
|
private function obtenirSousTaxons($nt) { |
$referentiel = 'bdtfx'; |
if($this->parametres['referentiel'] && $this->parametres['referentiel'] != "" && $this->parametres['referentiel'] != '*') { |
$referentiel = $this->parametres['referentiel']; |
} |
$nn_sous_taxons = array(); |
$sous_taxons = $this->obtenirSousTaxonsPourNt($referentiel, $nt); |
foreach($sous_taxons as $sous_tax) { |
$nn_sous_taxons[] = $sous_tax['num_nom']; |
} |
return $nn_sous_taxons; |
} |
|
private function construireWhereProjet() { |
$sql = ''; |
// Récupération des coordonnées depuis l'id station |