Ver Mensaje Individual
  #25 (permalink)  
Antiguo 25/10/2007, 12:17
Avatar de daria_eve
daria_eve
 
Fecha de Ingreso: agosto-2007
Ubicación: En mi P.L. Concón, Chile
Mensajes: 44
Antigüedad: 16 años, 8 meses
Puntos: 1
Exclamación Estoy bloqueada

mmmmm tengo k modificar el sistemita k taba haciendo....pero se me acabaron las ideas ........la verdad nececito mostrar todos los registros k estan es una tabla y no se me ocurre como lo puedo hacer.......recibo cualkier idea.....ayuda porrrrrrrrrrfavor

hasta el momento tengo la condicion para mostrar pero con lo que tengo hecho solo me muestra el primer registro de la tabla :

$codigo=$_POST['co'];



$result = mysql_query("SELECT cod_inst,num_serie,nombre_inst,marca,modelo,fabric ante,datos,fecha_compra,fecha_calibracion,fecha_ve ncalibracion,ubicacion,cod_acces,cod_al,cod_pers,c od_area FROM instrumentos where cod_area='$codigo'", $link);
echo "<table width='2500' height='10' align='center' height='10' cellpadding='5' cellspacing='5' border='5'>";

if ($row = mysql_fetch_array($result)){

echo"<br>";
echo"<br>";
echo"<center>INFORMACION PEDIDA</center>";
echo"<br>";
echo"<br>";
echo"<br>";


echo "<tr>";
echo "<td> Numero de serie </td>";
echo "<td> Nombre Instrumento </td>";
echo "<td>Marca Instrumento </td>";
echo "<td>Modelo Instrumento </td>";
echo "<td>Fabricante Instrumento </td>";
echo "<td>Datos Tecnicos </td>";
echo "<td>Fecha de compra </td>";
echo "<td>Fecha calibracion</td>";
echo "<td>Fecha Vencimiento calibracion</td>";
echo "<td>Ubicacion</td>";
echo "<td>Accesorios </td>";
echo"<td>Tipo de Alimentación </td>";
echo"<td>Persona a Cargo </td>";
echo"<td>Area </td>";

echo"</tr>";


echo "<tr>";

echo "<td>";
echo $row["num_serie"];
echo "</td>";


echo "<td>";
echo $row["nombre_inst"];
echo "</td>";


echo "<td>";
echo $row["marca"];
echo "</td>";


echo "<td>";
echo $row["modelo"];
echo "</td>";




echo "<td>";
echo $row["fabricante"];
echo "</td>";


echo "<td>";
echo $row["datos"];
echo "</td>";


echo "<td>";
echo $row["fecha_compra"];
echo "</td>";



if($row["fecha_calibracion"]==0000-00-00)
{
echo"<td>";
echo"No Aplica";
echo"</td>";

}
else{
echo"<td>";
echo $row["fecha_calibracion"];
echo"</td>";

}


if($row["fecha_vencalibracion"]==0000-00-00)
{

echo"<td>";
echo"No Aplica";
echo"</td>";

}
else{

echo"<td>";
echo $row["fecha_vencalibracion"];
echo"</td>";

}


if($row["ubicacion"]==0)
{

echo"<td>";
echo"Bodega";
echo"</td>";

}
else{

echo"<td>";
echo "Otro";
echo"</td>";

}


$acce=mysql_query("SELECT cod_acces,nombre_acces from accesorios where cod_acces= '$row[cod_acces]'");
$var_acce=@mysql_result($acce,0,'nombre_acces');
echo "<td>";
echo $var_acce;
echo "</td>";


$acce2=mysql_query("SELECT cod_al,tipo from alimentacion where cod_al= '$row[cod_al]'");
$var_acce2=@mysql_result($acce2,0,'tipo');
echo"<td>";
echo $var_acce2;
echo"</td>";


$acce3=mysql_query("SELECT cod_pers,nombre_pers,apellido_p, apellido_m from personal where cod_pers=
'$row[cod_pers]'");
$var_acce3=@mysql_result($acce3,0,'nombre_pers');
$var_acce3.=" ";
$var_acce3.=@mysql_result($acce3,0,'apellido_p');
$var_acce3.=" ";
$var_acce3.=@mysql_result($acce3,0,'apellido_m');

echo"<td>";
echo $var_acce3;
echo"</td>";


$acce4=mysql_query("SELECT cod_area,nombre_area from area where cod_area= '$row[cod_area]'");
$var_acce4=@mysql_result($acce4,0,'nombre_area');
echo"<td>";
echo $var_acce4;
echo "</td>";
echo"</tr>";

echo"<tr>";
echo"<td><a href='form_verinstrumentos.php'><center> <= Volver</center></a></td>";

echo"</tr>";
}


else {

echo "<script> alert (\"¡ No hay datos registrados en esa area!.\");</script>";
echo "<script language=Javascript> location.href=\"form_verinstrumentos.php\"; </script>";
die();

echo "";

}

?>