Bonjour,
Je suis débutante en php et j'ai un soucis avec mon code.
Voici l'erreur qui s'affiche :
"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"
Si quelqu'un pouvais m'aides ce serait vraiment super stp
Et voici mon code :
<?php
$id = $_REQUEST['id'];
$lien = mysql_connect('localhost:8889','root','root');
mysql_select_db('gontard',$lien);
$ls_sql = 'SELECT value FROM textes WHERE id = '.$id;
$rs = mysql_query($ls_sql, $lien);
if(mysql_errno($lien) != 0) die(mysql_error($lien));
$enr = mysql_fetch_array($rs);
echo 'value=' . $enr[0];
?>