This almost work (General)
This works:
"SELECT * FROM mlf2_entries, mlf2_userdata
WHERE mlf2_userdata.user_id = mlf2_entries.user_id
GROUP BY tid ORDER BY last_reply
DESC LIMIT 0, 5";
This shows the latest postings, original author and date of the latest reply. However, I want the username of the last person who replied. How can I do that?
If I use this query:
"SELECT * FROM mlf2_entries, mlf2_userdata
WHERE mlf2_userdata.user_id = mlf2_entries.user_id
GROUP BY pid ORDER BY last_reply
DESC LIMIT 0, 5";
I get this output:
- Lorem ipsum thread
by Ghost on 2015-12-07 09:05:58
- Lorem ipsum thread
by Evil Knievel on 2015-12-07 09:05:58
- Another thread
by Doc on 2015-12-07 09:05:58
- Lorem ipsum thread
by Caroline on 2015-12-07 09:05:58
- Another thread
by Marko on 2015-12-06 20:23:55
This is partly what I want, but I only want to show each topic once with the latest posting date and the last person who replied.