Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/07/2006, 11:36
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 20 años, 5 meses
Puntos: 2135
Usa esto:
Código PHP:
$mes = 10;
$anio = 2006;

$tiempoInicio = date( "Y-m-d", mktime( 0, 0, 0, $mes, 1, $anio ) );
$tiempoFin = date( "Y-m-d", mktime( 0, 0, 0, $mes, 30 /* o 31 dependiendo */, $anio ) );

$consulta = "SELECT * FROM `tabla` WHERE `colFecha` BETWEEN '$tiempoInicio' AND '$tiempoFin'";