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:

no sorting

second query order added in: all results have been added single row

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

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -