我有这个代码,但它不工作。在我使用最新评论进行查询后,我想颠倒顺序。
SELECT *
FROM(
SELECT users.id, users.nome, users.email,users.foto, comments.content
FROM users, comments
WHERE comments.posts_id=? AND comments.users_id=users.id
ORDER BY comments.id DESC LIMIT 5)
AS dummy
ORDER BY comments.timecomment ASC