Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/03/2014, 15:04
Avatar de Polu
Polu
 
Fecha de Ingreso: febrero-2003
Mensajes: 135
Antigüedad: 21 años, 3 meses
Puntos: 0
Error en consulta sql

Hola,

¿Alguien sabe dónde está el error de esta consulta?.

Código MySQL:
Ver original
  1. SELECT id_habitacion, nombre, descripcion, ocupacion_maxima, tarifa
  2. FROM habitacion LEFT JOIN reservadas ON (habitacion.id_habitacion = reservadas.id_habitacion
  3. AND fecha_entrada >= '' AND fecha_salida <= '')
  4. WHERE ocupacion_maxima >= 0
  5. GROUP BY id_habitacion, nombre, descripcion, ocupacion_maxima, tarifa
  6. HAVING count(*) = 0 ORDER BY ocupacion_maxima, asc, tarifa desc

La he probado directamente en phpmyadmin y me tira este error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'asc, tarifa desc LIMIT 0, 30' at line 6