Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/02/2010, 14:53
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: sumar precios, php mysql, sola consulta

Código PHP:
Ver original
  1. while($row = mysql_fetch_array($res_consulta))
  2.     {  
  3.         $precio = $row[precio];
  4.         $subtotal += $precio;
  5.         echo "$precio<br>";
  6.     }
  7.  
  8.  echo "Su total es: " $subtotal;
__________________
More about me...
~ @rhyudek1
~ Github