Ver Mensaje Individual
  #27 (permalink)  
Antiguo 01/04/2009, 15:44
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Reporte por grupos en php mysql

Prueba en asignar antes de imprimir.
Código:
do {
     $subtotal[] = $row['total'];
     $totales[] = $row['total'];
     if( new_group() {
           print_headers_grupo()
     }
      print_data($row)
     if( new_group() ) {
            print_subtotal( array_sum( $subtotal ) ); 
            $subtotal = array();
     }
} while ( $row = fetch_row() );
print_totales($totales);
Saludos.