Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/10/2016, 20:56
juancaalbarracin
 
Fecha de Ingreso: julio-2011
Ubicación: Los Rios
Mensajes: 145
Antigüedad: 12 años, 9 meses
Puntos: 10
Respuesta: Ordenar registros PHP & MYSQL

Prueba con:

Código MySQL:
Ver original
  1. SELECT nombre, AVG(estrellas)estrellas from Hoteles INNER JOIN votos ON hoteles.id_hotel=votos.id_hotel ORDER BY estrellas ASC

***no se si me falta un group by id_hotel jajaja
__________________
___________________________
Si te ayudo mi respuesta dale al +1