Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/04/2011, 13:28
Avatar de Huacho12
Huacho12
 
Fecha de Ingreso: septiembre-2008
Ubicación: Isla Mujeres Q. Roo
Mensajes: 175
Antigüedad: 15 años, 7 meses
Puntos: 10
Respuesta: problemas al pasar parametros a jpgraph.php

Hola ncw2233!!!

Mira prueba haciendo esto:

Código PHP:
.... 
foreach(
$matriz as $key => $value){ 
$x=0$x1=0$x2=0$x3=0$x4=0;
 for(
$i=60000;$i<=220000;$i=$i+10000){ 
     
$aux=$i+10000
      
$x++;
        
$consulta=mysql_query("Select count(*) as total from ".$table." where hora >".$i." and hora < ".$aux."  and status =".$value,$conexion); 

       if (
$file mysql_fetch_array($consulta)){ 
           
// echo "Status: ".$x." Valor: ".$file["total"]; 
               
if($key==1
              
$datay1[$x1] = $file["total"]; $x1++;//$var[$key][$x]=array($file["total"]); 
               
if($key==2
               
$datay2[$x2] = $file["total"]; $x2++;//$var[$key][$x]=array($file["total"]); 
               
if($key==3
               
$datay3[$x3] = $file["total"]; $x3++;//$var[$key][$x]=array($file["total"]); 
               
if($key==4
              
$datay4[$x4] = $file["total"]; $x4++;// $var[$key][$x]=array($file["total"]); 
                

   
         }  
    } 
Con eso las variables $datay1, $datay2,....... se vuelven vectores o arrays, con esto ya puedes ponerlos en la funcion del JpGraph:

Código PHP:
$bplot1 = new BarPlot($datay1);
$bplot2 = new BarPlot($datay2);
$bplot3 = new BarPlot($datay3);
$bplot4 = new BarPlot($datay4); 
Espero sea esto a lo que te refieres en tu comentario.

Saludos.
__________________
Solo se... que no se nada!!! 0_o