Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/03/2013, 13:07
Avatar de guardarmicorreo
guardarmicorreo
 
Fecha de Ingreso: noviembre-2012
Ubicación: Córdoba
Mensajes: 1.153
Antigüedad: 11 años, 5 meses
Puntos: 84
problema con UPDATE

tengo este update para actualizar un campo de una tabla

Código PHP:
Ver original
  1. $consulta="UPDATE habitaciones SET $tipo where $tipo=".$_POST['cantidad_select'];
  2. $result_conexion=Conectar($consulta);

y me devuelve este error. no consigo encontrar el supuesto error de sintaxis.

Código HTML:
Ver original
  1. ERROR:
  2. 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 'where triple=10' at line 1

¿alguien me puede ayudar? gracias!