Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/04/2015, 21:13
Pablo2015
 
Fecha de Ingreso: abril-2015
Mensajes: 7
Antigüedad: 9 años, 1 mes
Puntos: 0
Consulta en mysql con php

Hola a todos,

Tengo esta tabla que necesito sacar los siguientes resultados

TABLA DISPONIBILIDAD

ID_DISPONIBILIDAD FECHA CUPO ID_HOTEL
-------------------------- -------------- ----------- ----------------
1 2015-04-01 3 1
2 2015-04-02 3 1
3 2015-04-03 3 1
4 2015-04-04 3 1
5 2015-04-05 3 1
6 2015-04-06 3 1


Luego hago un select

select * from disponibilidad
where fecha between '2015-04-01' and '2015-04-03'

que me devuelve :
-------------------------------
ID HOTEL 1
CUPO 3
FECHA 2015-04-01
-------------------------------
-------------------------------
ID HOTEL 1
CUPO 3
FECHA 2015-04-02
-------------------------------
-------------------------------
ID HOTEL 1
CUPO 3
FECHA 2015-04-03
-------------------------------

pero en realidad lo que yo necesito es mostrar solamente 1 vez el id de hotel junto a las 3 fechas pero juntas no se si me explique bien.

Gracias!