GROUP BY with ORDER BY
Searched through the articles but couldn't find anything specific for
solving my problem.
SELECT `id_von`, `message`, `timestamp`
FROM `messages`
WHERE `id_von` = $session_user_id OR `id_re` = $session_user_id
GROUP BY id_von
ORDER BY TIMESTAMP DESC
Problem is it is not the newest entry. Its actually the first one in the
DB. Would really appreciate the help.
No comments:
Post a Comment