MySql--Order by is "breaking" my query? -
so, have query want execute, , once it's done want results sorted time desc.
however when spits out single result... here's i'm seeing:
first query no sorting:
second query order added in:
can me understand what's going on , how fix it?
thanks,
your queries different.
variables evaluated after order by
clause. result, different set of rows satisfy having
clause.
to fix problem, put query -- without order -- subquery. selection want , order by
in outer query.
edit:
i'm not going retype query pasted images. structure of query is:
select * (<your query here>) s order time desc limit 5
Comments
Post a Comment