Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/08/2009, 15:04
Twonex
 
Fecha de Ingreso: julio-2009
Ubicación: .mysql_error ( XD )
Mensajes: 554
Antigüedad: 14 años, 9 meses
Puntos: 13
Respuesta: Cómo Sumar una Fila Completa?

me tira el manso error
quizas lo hize mal
el codigo quedo asi:

Código PHP:
<?php
mysql_connect 
("localhost""root""");
    
mysql_select_db ("sistema") or die ("Verifique la Base de Datos");;
    
$consul "SELECT * FROM total WHERE año='$anio' AND tipo='Cune'";
    
$resul mysql_query ($consul) or die ("Error en consulta:".mysql_error());
    
    while (
$fila mysql_fetch_array($resul))
    {
        
$gTS $gTS $fila["columna_total_segmentos"];
?>
  
  <tr class="td">
    <td class="letras3"><?php echo $fila["categorias"?></td>
    <td><?php echo $fila["enero"?></td>
    <td><?php echo $fila["febrero"?></td>
    <td><?php echo $fila["marzo"?></td>
    <td><?php echo $fila["abril"?></td>
    <td><?php echo $fila["mayo"?></td>
    <td><?php echo $fila["junio"?></td>
    <td><?php echo $fila["julio"?></td>
    <td><?php echo $fila["agosto"?></td>
    <td><?php echo $fila["septiembre"?></td>
    <td><?php echo $fila["octubre"?></td>
    <td><?php echo $fila["noviembre"?></td>
    <td><?php echo $fila["diciembre"?></td>
    <td><?php echo $gTS ?></td>
  </tr>

además que pasa si el campo que quiero sumar esta en Null?
lo ignora y hace la suma igual o me hace un cuak?

saludos