simple select question
Date: 11/19/05
(Web Development) Keywords: no keywords
i have this query:
SELECT grps.groupid, grps.title, grps.create_date, grps.leaderid AS userid, grps_post.userid AS lastposter, grps_post.dateline AS lastpostdateline, COUNT( grps_post.userid ) AS replies
FROM grps
LEFT JOIN grps_post ON ( grps_post.groupid = grps.groupid )
GROUP BY grps_post.dateline
ORDER BY grps_post.groupid
kinda, what i'm trying to make it do is SELECT the first row for the rest of the records, but the last row (i.e. the row with the highest dateline value) from the grps_post table along with the unique line from grps table, what am i doing wrong as i only seem to be able to retreive the first line?
i should know this, i'm pretty sure i do during the day time, but have no clue right now.
Source: http://www.livejournal.com/community/webdev/271720.html