Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/03/2010, 12:40
Avatar de santris
santris
 
Fecha de Ingreso: agosto-2009
Ubicación: Sant Feliu de Llobregat
Mensajes: 955
Antigüedad: 14 años, 9 meses
Puntos: 66
Respuesta: consutas por calendario

Mira si esto te puede servir:
Código PHP:
<?php
$conexion 
conectar();
$hoy date("Y-m-d");//la fecha de hoy
$fecha_fin date("Y-m-d"strtotime"$hoy + 90 day"));//añade 90dias a la fecha de hoy
$sql "select * from registro where fecha >= $hoy and fecha <= $fecha_fin ";
$res query($sql);
if(
mysql_num_rows($res) > 0){
    while(
$fila mysql_fetch_array($res)){
        echo 
"<tr><td class='tdfecha'>".$fila['fecha']."</td><td"
    }
}else{
    echo 
"<tr><td>no hay registros de este dia.</td></tr>";
}
desconectar($conexion);
?>
Saludos
__________________
Tu álbum de cromos online!!