37,12 → 37,15 |
$nomRang = $this->obtenirNomRang($this->taxon); |
if ($nomRang == 'famille') { |
$criteres[] = "famille=".$this->bdd->proteger($this->taxon['nom_sci']); |
} elseif ($nomRang == 'genre') { |
$criteres[] = "nom_sel LIKE ".$this->bdd->proteger($this->taxon['nom_sci'].'%'); |
} else { |
$criteres[] = "nt=".$this->taxon['num_taxonomique']; |
$taxons = array($this->taxon['num_taxonomique']); |
$sousTaxons = $this->recupererSynonymesEtSousEspeces(); |
foreach ($sousTaxons as $sousTaxon) { |
$criteres[] ="nt=".$sousTaxon['num_taxonomique']; |
$taxons[] = $sousTaxon['num_taxonomique']; |
} |
$criteres[] = "nt IN (".implode(',', $taxons).")"; |
} |
return "(".implode(' OR ',array_unique($criteres)).")"; |
} |