Tema: peligro
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/12/2005, 16:54
pablobaez
 
Fecha de Ingreso: octubre-2005
Mensajes: 129
Antigüedad: 18 años, 6 meses
Puntos: 0
Pregunta peligro

al hacer un pequeña aplicacion recivo ese mensaje que el argumento es invalido
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in

y esta es la aplicación

<?php
$link =mysql_connect("localhost","root");
if (!$link)
{
die('No hubo conexión�'.mysql_error());
}
$buscar_datos=mysql_select_db("prueba",$link);
if (!$buscar_datos)
{
die('no se encontro la base de datos'.mysql_error());
}
$rut =$_GET['rut'];
$resultado=mysql_query("select rut, nombre, correo from prueba.datos where rut=$rut");
?>
<table>
<form method="Get" action="">
<tr>
<td>Parametro de busqueda</td>
<td><input type="text" ></td>
<td><input type="submit" name ="rut" ></td>
</tr>
</table>


<table border=1>
<tr>
<td>Rut</td>
<td>Nombre</td>
<td>Correo</td>
</tr>
<?php
while($row=mysql_fetch_array($resultado))
{
echo '<tr><td>'.$row['rut'].'</td>';
echo '<td>'.$row['nombre'].'</td>';
echo '<td>'.$row['correo'].'</td></tr>';
}
mysql_free_re