Código:
pero no me ordena por la habitacion, me lo deja como estaba,SELECT h.idhabitacion, h.descripcionh, h.habit_x_hotel, ho.descripcionho FROM habitacion h INNER JOIN hotel ho ON h.habit_x_hotel = ho.idhotel where h.habit_x_hotel = '1' GROUP BY h.idhabitacion ORDER BY h.habitacionh DESC
lo curioso es que si "hace caso" cuando quito el group by:
Código:
ahi si me funciona, ¿a que se debe? SELECT h.idhabitacion, h.descripcionh, h.habit_x_hotel, ho.descripcionho FROM habitacion h INNER JOIN hotel ho ON h.habit_x_hotel = ho.idhotel where h.habit_x_hotel = '1' ORDER BY h.habitacionh DESC