Ver Mensaje Individual
  #11 (permalink)  
Antiguo 29/05/2007, 13:51
Avatar de Carsan
Carsan
 
Fecha de Ingreso: abril-2007
Ubicación: Mexico
Mensajes: 109
Antigüedad: 17 años
Puntos: 0
Re: ID correspondiente en Link

me da el siguiente error.

Error, query failed: 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

<?php
$id = $_GET["id"];
require_once ("config.php");

$query = "SELECT * FROM equipos where id = $id";
$result = mysql_query($query) or die('Error, query failed: ' . mysql_error());
if(mysql_num_rows($result) == 0)
{
echo "Database is empty <br>";
}
else
{
while(list($id, $sub_categoria, $nombre, $marca, $modelo, $n_serie, $precio, $descripcion) = mysql_fetch_array($result))
{?>

Última edición por Carsan; 29/05/2007 a las 13:53 Razón: agrego