99,6 → 99,7 |
public function rechercherFloue() { |
$table = $this->getTable(); |
$masque = $this->parametres->getMasquePourBdd(); |
$where = $this->getWhere(); |
$navigation = $this->getNavigation(); |
$requete = 'SELECT SQL_CALC_FOUND_ROWS ns.*, '. |
' nr.nom_sci AS nr_nom_sci, nb.nom_sci AS nb_nom_sci '. |
105,10 → 106,10 |
"FROM $table AS ns ". |
" LEFT JOIN $table AS nr ON (ns.num_nom_retenu = nr.num_nom) ". |
" LEFT JOIN $table AS nb ON (ns.basionyme = nb.num_nom) ". |
$this->getWhere(). |
($masque ? |
" (SOUNDEX(ns.nom_sci) = SOUNDEX($masque)) ". |
" OR (SOUNDEX(REVERSE(ns.nom_sci)) = SOUNDEX(REVERSE($masque))) " : ''). |
$where . |
($masque ? ($where ? ' AND ' : ' WHERE '). |
" (SOUNDEX(ns.nom_sci) = SOUNDEX($masque)) ". |
" OR (SOUNDEX(REVERSE(ns.nom_sci)) = SOUNDEX(REVERSE($masque))) " : ''). |
'ORDER BY ns.nom_sci ASC '. |
"LIMIT $navigation "; |
$resultats = $this->bdd->recupererTous($requete); |