Ya he estado trabajando en una pequeña prueba pero no obtengo ningun resultado... A ver si alguien me puede ayudar... Yo creo que tiene algo que ver con el ciclo for
Código PHP:
Ver original<?php
include("conexion.php");
$con=conectar();
$fecha_actual=date('d/m/Y');
$datos="SELECT * from reporte_horas where fecha<=current_date()";
$fecha_div=explode("/",$fecha_actual); $dia=$fecha_div[0];
$mes=$fecha_div[1];
$year=$fecha_div[2];
for($i=0; $i<=$dia;$i++)
{
$fecha_acum="SELECT sum(horas) from reporte_horas where fecha=$i/$mes/$year)";
}
while($variable=$resultado2)
{
echo '<tr>';
echo '<td>',$variable,'</td>';
echo '</tr>';
}
?>