
21/07/2011, 15:59
|
| | Fecha de Ingreso: mayo-2010
Mensajes: 414
Antigüedad: 14 años, 10 meses Puntos: 2 | |
consulta mysql y php Tengo esta consulta muy simple:
<?php
session_start();
include("../configuracion/conexion-usuario.php");
include("conexion.php");
$usuario=$_SESSION["logueado"];
$hora=$_POST["hora"];
$orden="INSERT INTO venta (hora) VALUES ('$hora') WHERE usu='$usuario'";
$rs=mysql_query($orden, $conn) or die (mysql_error());
?>
Y me pone lo siguiente:
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 usuario='luis'' at line 1
En la base de datos tengo el campo hora vacio y los demás campos con datos
Gracias, saludos! |