Ver Mensaje Individual
  #5 (permalink)  
Antiguo 24/06/2009, 05:13
superdober
 
Fecha de Ingreso: agosto-2007
Mensajes: 248
Antigüedad: 16 años, 8 meses
Puntos: 1
De acuerdo Respuesta: Meter Resultado consulta SQL en MATRIZ PHP

La solución es la siguiente:


Código PHP:
$sql_hff "SELECT id_hff,media,sinagotados,unagotado,dosomasagotados, porcentajesinagotados FROM t_hff t ORDER BY id_hff ASC";

$resultado_sql_hff mysql_query($sql_hff) or mysql_error();

if (!
$resultado_sql_hff//Comprobacion si Consulta da Error
 
{          
  
mysql_close ($connection); 
  
header("Location: errorconsultabbdd.php");             
  exit();          
 }

$matriz_hff = array(); //Creamos Matriz

//Rellenamos Matriz con el contenido de la tabla T_HFF (MySQL)
while ($result_rowhff mysql_fetch_row(($resultado_sql_hff)))
 {
  
$matriz_hff[] = $result_rowhff;
 }

//TRAZA SEGUIMIENTO: PINTAMOS LA MATRIZ HFF
echo $matriz_hff["0"]["0"]."|";
echo 
$matriz_hff["0"]["1"]."|";
echo 
$matriz_hff["0"]["2"]."|";
echo 
$matriz_hff["0"]["3"]."|";
echo 
$matriz_hff["0"]["4"]."|";
echo 
$matriz_hff["0"]["5"]."|";
echo 
"<br/>";echo "<br/>";
echo 
$matriz_hff["1"]["2"]."|"