Page 1 of 1

selecting the last row of the GROUP BY

Posted: Sat Mar 05, 2011 10:59 am
by REwingUK
How would i go about selecting the last row of the GROUP BY ?

Code: Select all

SELECT * FROM messaging INNER JOIN messaging_subject ON messaging.subject_id = messaging_subject.subjectID WHERE messaging.user_id = '$userID' GROUP BY messaging.conversation_id ORDER BY messaging.date_sent DESC 
Thanks in Advance

Re: selecting the last row of the GROUP BY

Posted: Sun Mar 06, 2011 4:55 am
by social_experiment
Add 'LIMIT 1' to the end?