Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/06/2010, 08:05
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Group by y Order by no me devuelven lo que quiero

Entonces hazlo así:
Código SQL:
Ver original
  1. SELECT
  2. t.id,
  3. t.catid,
  4. t.name,
  5. t.userid,
  6. t.subject
  7. FROM
  8. (
  9.  SELECT id,
  10.  catid,
  11.  name,
  12.  userid,
  13.  subject
  14.  FROM mensajes
  15.  GROUP BY thread  
  16. )t
  17. ORDER BY t.id DESC
  18. LIMIT 6;

PD: podrías poner el enlace donde el manual oficial dice eso?
__________________
Without data, You are another person with an opinion.
W. Edwads Deming