Ver Mensaje Individual
  #8 (permalink)  
Antiguo 07/03/2012, 15:27
massu_vago
 
Fecha de Ingreso: diciembre-2008
Mensajes: 88
Antigüedad: 16 años, 1 mes
Puntos: 0
Respuesta: Tabla horizotal php

Gracias a todos por su ayuda alfinal logre solucionarlo era algo basico abrir el tr en el primer if y cerrarlo en el ultimo dejo el codigo por si a alguien le sirve

Código PHP:
mysqli_free_result(); 
    
$Connection mysqli_connect("172.17.97.118","root","Passw0rd");
    
mysqli_select_db($Connection,'ces_calidad') or die("Could not connect to database");
    
$sql2="call notas_ciclo_asesores('J. Santander');";
    
$result2 mysqli_query($Connection,$sql2);
    
$tbl_notas ' <table cellpadding="0" cellspacing="0" width="550" style="font-size:11px;">';
    
$tbl_notas .= '<thead style="font-weight:bold;">
                            <tr>
                                <td align="left" >Nombre Asesor.</td><td>Ciclo 1</td><td >Ciclo 2</td><td>Ciclo 3</td><td >Ciclo 4</td>
                            </tr>
                        </thead><tbody>'
;
    
    while(
$row2 mysqli_fetch_array($result2)){
        
        
        if(
$row2[5]==1)
        {
            
$tbl_notas .= '<tr>';
            
$tbl_notas .= '<td align="left" >'.$row2[1].'</td>';
            
$tbl_notas .=  '<td >'.$row2[4].'</td>';
            
//echo $row2[5];
        
}
        if(
$row2[5]==2)
        {
            
$tbl_notas .=  '<td >'.$row2[4].'</td>';
            
//echo $row2[5];
             
        
}
        if(
$row2[5]==3)
        {
            
$tbl_notas .=  '<td >'.$row2[4].'</td>';
            
//echo $row2[5];
             
        
}    
        if(
$row2[5]==4)
        {
            
$tbl_notas .=  '<td >'.$row2[4].'</td>';
            
//echo $row2[5];
             
$tbl_notas.='</tr>';
        }                
        
    }
    
    
$tbl_notas.='</tbody></table>'
    echo 
$tbl_notas