I’m trying to group messages like conversation and to display only the latest message from a conversation, therefore I need the one with the highest number in the column time.
This is my query:
SELECT *
FROM console_msgs
WHERE `to` = $user[id]
GROUP BY `from`
ORDER BY time DESC
Thanks for any help!
You want the groupwise maximum: