
Haciendo una prueba de actualizacion.
Publicado por Rafael Hurtado (54 intervenciones) el 18/10/2012 18:10:52
Estoy tratando de actualizar unos datos pero al introducir este codigo me sale un error... Anexo el error. SI alguien pudiera ayudarme agradecido estare con esa persona.
Error.:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\update-test3.php on line 21
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
Error.:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\update-test3.php on line 21
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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head>
<title>Prueba 3</title>
<body>
<h1>Estos es una Prueba</h1>
<?php
//Apertura a la Base de datos.
include("apertura.php");
//Identificador de variable.
$id_cliente = $_GET ["id"];
//Sentencia SQL para la seleccion del cliente en la base de datos.
$ssql = "select * from vehiculos where EMPRESA=" . $id_cliente;
//Ejecutar sentencia SQL para la seleccion de cliente en la base de datos.
$cliente_editar = mysql_query ($ssql);
//Consigo los datos del cliente que estoy seleccionando.
$lista = mysql_fetch_object($cliente_editar) or die (mysql_error ());
//Ahora empiezo a elaborar el formulario para usando simplemente HTML.
?>
</body>
</head>
</html>
Valora esta pregunta


-1