Jerry Schwartz <jschwartz <at> the-infoshop.com> writes:

> I'm still confused, are you saying that you want to know what page a team
> would be on if you did a listing?
> 
> Regards,

Yes, given a query (e.g. "SELECT ... FROM teams ORDER BY score DESC, errors")
which we usually add a LIMIT clause to for pagination, and a team (either given
by a primary ID, or maybe in other cases by a subquery returning one result from
the result set, depending on the query), we want to find out the position that
the team appears in the result. The aim being to do something like listing the 5
higher and 5 lower teams, or to provide a link to the page which contains this 
team.

My question originally was to find the page number, but instinctively I'd do
that by finding the overall position and doing some arithmetic - I don't think
it would be reasonable to assume MySQL would understand my pagination

Thanks for sticking with this,
Gareth


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to