Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/11/2007, 12:24
Avatar de tricampeon27
tricampeon27
 
Fecha de Ingreso: enero-2007
Ubicación: Macul
Mensajes: 300
Antigüedad: 17 años, 3 meses
Puntos: 0
Re: Recorrer un mysql_fecth_array

con este codigo puedes reccorrer un select

include "conexion.php" ;

//rescato user y pasword
$rut = $_POST["rut"];
$usuvrtrut = $_POST["usuvrtrut"];
//echo "rut $rut";

//sleep(3);

// llamo sp que valida user y pasowrd
$result = mysqli_query($conexion,"call sp_select_usuarios($rut);");
if (! $result)
{
die('[index.php:] error de mysql_querry ' . mysql_error());
exit;
}
// extrae datos de la bd

if ($row = mysqli_fetch_array($result,MYSQLI_NUM))
{
do
{

//while ($row = mysqli_fetch_array($result,MYSQLI_NUM))

$id = $row[0];
echo "retorno id: $id\n";
$idd = $row[1];
exit;
if ($id == 1)
{
echo"<meta http-equiv='refresh' CONTENT='0;URL=fra_contenedorSuper.php'>";
exit;
}
if ($id == 2)
{
echo"<meta http-equiv='refresh' CONTENT='0;URL=fra_contenedor.php'>";
exit;
}
if ($id <> 1 || $id <> 2)
echo "<div id='Layer2' style='position:absolute; left:490px; top:320px; width:240px; height:55px; z-index:1'> <table width='100%' border='2' align=center ><td><CENTER>Usuario No Registrado</CENTER></td></font></div>";
}
while ($row = mysqli_fetch_array($result,MYSQLI_NUM));
}
} // fin del if post
__________________
*****Si Hasta En La Cana X Ti Estado*****