esto tengo y no me funciona:
Código PHP:
<?php mysql_select_db($bd,$cnn);
$tiempo = time();
if ( date("m", $time) == '03' )
{
// Tomamos los datos de la fecha...
$fdevolucion= date("Y-m-d", $time);
} ;
$sSQL="SELECT importe FROM alquileres WHERE fdevolucion='$fdevolucion'";
$res=mysql_query($sSQL,$cnn) or die (mysql_error());
for ($cnt=0;$cnt<mysql_num_rows($res);$cnt++){
$row=mysql_fetch_assoc($res);
//$row['fdevolucion'];
$row['importe'];
//$importe=0;
$importe = ($importe + $row['importe']);
}
echo $importe . "€";?>
alquien ve un fallo?