'."\n"; $code .= '\n"; $code .= ''."\n"; $code .= "\n"; return $code; } function recherche($table, $critere, &$liste, &$id) { global $bdd; $req = 'SELECT * FROM `kobold_'.$table."` WHERE `nom` LIKE '%".$critere."%'"; if (!$reqq = @mysql_query($req, $bdd)) return FALSE; $nb = @mysql_num_rows($reqq); while ($resu = @mysql_fetch_object($reqq)) { $nom = preg_replace('~('.$critere.')~i', '$1', $resu->nom); if ($table == 'produits') $liste->ajout_element(''. $nom.''); elseif ($table == 'ingredients') $liste->ajout_element(''. $nom.''); elseif ($table == 'fonctions') $liste->ajout_element(''. $nom.''); $id = $resu->id; } return $nb; } ?>