Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/05/2008, 11:25
pablobaez
 
Fecha de Ingreso: octubre-2005
Mensajes: 129
Antigüedad: 18 años, 7 meses
Puntos: 0
problemas con query

buenas tardes tengp la siguiente aplicacion ::



<html>
<head>
<body>
<?php
$link =mysql_connect("localhost","root","pablo");
if (!$link)
{
die('No hubo conexiÔøΩ'.mysql_error());
}
$buscar_datos=mysql_select_db("reportes",$link);
if (!$buscar_datos)
{
die('no se encontro la base de datos'.mysql_error());
}
$n_report =$_GET['n_report'];
$resultado=mysql_db_query('select n_report, serie_equipo, fecha_report, estado from reportes.reportgenerados where rut=$n_report') or die ('query malo'. mysql_error ());
?>

<table border =1>
<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>Nº de reporte</td>
<td>serie del equipo</td>
<td>fecha del reporte</td>
</tr>>
</table>
</form>
<?
while($row=mysql_fetch_array($resultado))
{
echo '<tr><td>'.$row['n_report'].'</td>';
echo '<td>'.$row['serie_equipo'].'</td>';
echo '<td>'.$row['fecha_report'].'</td></tr>';
}
mysql_free_result($resultado);
?>
</body>
</html>





me arroga el sigiente error ::

Warning: Wrong parameter count for mysql_db_query() in C:\AppServ\www\aplicacion\buscar.php on line 16
query malo

revise e lquery y esta bien debe haber algun problema con la variable