uff pues no me va... el caso es q como lo as puesto parece q esta todo bien
este es el codigo entero
Código PHP:
<?php mysql_select_db($bd,$cnn);
$tiempo1 = time();
$dia1 = date("d", $tiempo1);
if ( $dia1 >= '1' && $dia1 <= '7' )
{
// Tomamos los datos de la fecha...
$fdevolucion1= date("Y-m-d", $tiempo1);
};
$sSQL="SELECT importe FROM alquileres WHERE fdevolucion='".$fdevolucion1."'";
$res=mysql_query($sSQL,$cnn) or die (mysql_error());
for ($cnt=0;$cnt<mysql_num_rows($res);$cnt++){
$row=mysql_fetch_assoc($res);
$row['importe'];
$importe1 = ($importe1 + $row['importe']);
}
echo $importe1 . "€";?>