Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/02/2012, 14:14
Avatar de moronino
moronino
 
Fecha de Ingreso: marzo-2010
Mensajes: 55
Antigüedad: 14 años, 1 mes
Puntos: 0
error in your SQL syntax

Tebgo el siguiente problema, en un secuencia sql sencilla me salta el siguiente error:

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

la secuencia es:

Código SQL:
Ver original
  1. $sql = "SELECT * FROM restaurante WHERE id=" . $_POST["id"];
  2. $result=mysql_query($sql,$link) OR die (mysql_error());
  3. IF (($row=mysql_fetch_array($result))) {

Nose donde esta el fallo, podrian ayudarme??