113,14 → 113,13 |
private function construireWhereTaxonMoissonnage($source) { |
$nomRang = $this->obtenirNomRang(); |
$criteres = array(); |
$criteres[] = ($source == "baznat" || $source == "ifn") ? |
"num_nom = ".$this->taxon['num_nom'] : |
"nom_scientifique_complet LIKE ".$this->bdd->proteger($this->taxon['nom_sci']) ; |
|
$nom = ($source == "baznat") ? implode('%',explode(' ',$this->taxon['nom_complet'] )) : $this->taxon['nom_sci'] ; |
$criteres[] = "nom_scientifique_complet LIKE ".$this->bdd->proteger($nom); |
if ($this->nomRang == 'espece' || $this->nomRang == 'sous_espece') { |
foreach ($this->taxons as $sousTaxon) { |
$criteres[] = ($source == "baznat" || $source == "ifn") ? |
"num_nom = ".$sousTaxon['num_nom'] : |
"nom_scientifique_complet LIKE ".$this->bdd->proteger($sousTaxon['nom_sci']) ; |
$nom = ($source == "baznat") ? implode('%',explode(' ',$sousTaxon['nom_complet'] )) : $sousTaxon['nom_sci']; |
$criteres[] = "nom_scientifique_complet LIKE ".$this->bdd->proteger($nom); |
} |
} elseif ($this->nomRang == 'famille') { |
foreach ($this->genres as $genre) { |