Mysql Subquery to reverse order -
i have code , not working. want reverse order after make query latest comments.
select * from( select users.id, users.nome, users.email,users.foto, comments.content users, comments comments.posts_id=? , comments.users_id=users.id order comments.id desc limit 5) dummy order comments.timecomment asc
looks need give outer query (cid) sort on, you're doing;
select * (select users.id, users.nome, users.email,users.foto, comments.content, comments.id cid users, comments comments.posts_id=1 , comments.users_id=users.id order comments.id desc limit 5) dummy order cid asc
Comments
Post a Comment