Ver original$lastcut=mysql_query("select campo from mi_tabla where fecha between $fecha1 and $fecha2");while ($row_lastcut = mysql_fetch_assoc($lastcut)){ $suma+=$row_lastcut["ingresos"]; $resta+=$row_lastcut["egresos"];}