I am not sure I understand your question, I thought the line you showed would give proper results (100 total-ordered lines) but maybe :
So there is a similar thread running now, Re: SQL Select Idea [ORDER BY] by Michael, he says creating a temporary table is the way to go : "create temporary table top100 select * from mytable limit 100; select * from top100 order by total desc;" I don't know if you need to erase the temporary table or if it's automatic once the query has been processed, but I wonder if there is another way to do that in one command.. anyone? > -----Message d'origine----- > How can I limit the result after the "order by" has > been executed? This stops efter 100 rows and the > result is not as I intended... > > Select * from mytable ORDER by total desc limit 0, 100 > > Must this be done in PHP? --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php