Bonsoir,

Je me retrouve avec une erreur MySQL et je ne sais pas comment réctifier l'erreur ?
Erreur : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
Et voici mes requêtes :
$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
mysql_select_db($db) or die ('Erreur :'.mysql_error());
//$sql_recherche = $_POST['recherche'];

$sql_recherche = (isset($_POST['recherche'])) ? " WHERE ref = ".$_POST['recherche']."'" : "";

$select = 'SELECT ref,nom,adr,rem,tech,date,tel FROM prestation_juillet_2006'.$sql_recherche;

$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$total = mysql_num_rows($result);


if($total) {
D'avance merci