Jerry Schwartz <jschwartz <at> the-infoshop.com> writes: > Can't you just keep track of which page you are on, and multiply by 20 > (except for the last page)? I must be missing something. > > Regards,
Hi Jerry, The problem is that the page isn't necessarily known at the time we need to find out its position. As a simple example, finding a team's position in a large league, based on "ORDER BY score DESC, errors ASC". The team may not have been accessed from the paginated league-table list. Maybe one solution would be to run the full query but only select the primary key, and then do searching in the application, but this seems a little messy, and still has to transfer a long dataset out to the application only for most of it to be discarded. Since MySQL has to collate a query, it seems strange that there's no kind of "SELECT ROW_NUMBER(), ..." which could then be used in a subquery or something (maybe not very efficient, but still more efficient than passing the entire resultset to the application where the searching could easily be slower depending on the language) Just my $0.02 Gareth -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]