Tema: Sumatorio
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/09/2004, 11:57
Avatar de Fociños
Fociños
 
Fecha de Ingreso: marzo-2004
Ubicación: A Coruña
Mensajes: 587
Antigüedad: 21 años
Puntos: 0
Sumatorio

Hola, me gustaría saber cómo sumar todos los $totalganado que se crean al buscar los distintos registros en la tabla.

Código PHP:
while($row mysql_fetch_array($rs))
    {
    
$fechacreacion strtotime ($row["Fecha_creación"]);
    
$fechaexpiracion strtotime ($row["Fecha_expiración"]);        
    
$tiempototal $fechaexpiracion $fechacreacion;
    
$mesesalquiler ceil ($tiempototal 2678400);
    
$totalganado $mesesalquiler $row["Pago_alquiler"];
    }