View Full Version : why doesnt limit work fully
09-17-2006, 02:57 AM
Why is it, when you have a query, and you limit something, it doesntlimit the records searched? such as, i have a query that searches for "joe" and puts it in ASC order and limit 5, itll go through all joe's, is limit only good for displaying records, such as only 5 records show, ? if that made any sense :)
09-17-2006, 03:03 AM
in a select yes the limit is only telling how many records to display and which ones dependent on an order by clause.
if you use
order by foo
it would show the first five records according to foo ascending.
limit 5 can be rewritten as 0,5 which says start at row 0 and show 5 records.
if you used limit 5,5 it says to start at record after 5 and show the next five records.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.