Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/02/2013, 11:46
quimfv
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 1 mes
Puntos: 574
Respuesta: Busqueda con order by

Código MySQL:
Ver original
  1. SELECT DISTINCT eventos.ev_id
  2. FROM (eventos  INNER JOIN organizadores ON eventos.ev_organizador=organizadores.or_id)
  3.             INNER JOIN sitios ON eventos.ev_sitio=sitios.si_id
  4. WHERE eventos.ev_activo =1
  5. AND eventos.ev_fecha >= ( CURRENT_DATE( ) )
  6. AND eventos.ev_tipo =0
  7. ORDER BY eventos.ev_fecha ASC, organizadores.or_verificado DESC , sitios.si_verificado DESC
  8. LIMIT 0 , 9

Así debería funcionar....
__________________
Quim
--------------------------------------------------
Ayudar a ayudar es una buena práctica!!! Y da buenos resultados.