$ICI = $_POST["ICI"]
Lignes à remplacer
$mot = $_POST["motsclef"];
$select = "SELECT nom,formule,reference,disponibilite,localisation,quantite,numero_cass,toxicite FROM produit2 WHERE '".$col."' LIKE '%$mot%'ORDER BY 'nom' ASC limit ".$limite.','.$nombre;
ta requette est synthaxiquement correcten mais la clause where accepte tout les mots, donc te renvoit tout le contenu de la tableil saffiche sa
SELECT nom,formule,reference,disponibilite,localisation,quantite,numero_cass,toxicite FROM produit2 WHERE 'nom' LIKE '%%'ORDER BY 'nom' ASC limit 0,20
Code : Tout sélectionner
$methode = $_POST['methode'];
$motsclef = explode(" ",$motsclef);
$nbr_mots = count($motsclef);
$select = 'SELECT count(nom) FROM produit2';
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$row = mysql_fetch_row($result);
$total = $row[0];
$select="SELECT nom,formule,reference,disponibilite,localisation,quantite,numero_cass FROM produit2";
if ($_POST['methode']){
$select .= " WHERE ".$_POST['methode']." LIKE %".$_POST['motsclefs']."%";
$select .= " ORDER BY 'nom'";
$select .= " ASC limit ".$limite.','.$nombre;
}
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
Code : Tout sélectionner
$methode = $_POST['methode'];
$motsclef = explode(" ",$motsclef);
$nbr_mots = count($motsclef);
$select = 'SELECT count(nom) FROM produit2';
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$row = mysql_fetch_row($result);
$total = $row[0];
$select="SELECT nom,formule,reference,disponibilite,localisation,quantite,numero_cass FROM produit2";
if ($_POST['methode']){
$select .= " WHERE ".$_POST['methode']." LIKE %".$_POST['motsclefs']."%";
}
$select .= " ORDER BY 'nom'";
$select .= " ASC limit ".$limite.','.$nombre;
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );