I think you need this syntax SELECT * FROM Clients ORDER BY Name LIMIT <offset>,<rows>
Your offset must be rows per page * pagenumber where minimum pagenumber is 0 You should also count the full result set divide that count by the number of rows per page to get the last page number If the remainder is not zero, then add one to the max pagenumber ----- Original Message ----- From: Nuno Oliveira <[EMAIL PROTECTED]> To: mysql@lists.mysql.com Sent: Friday, January 12, 2007 10:04:34 AM GMT-0500 US/Eastern Subject: Row position in table when sorted? Hello, I'm working on a web site which have a page for the admin to browse the clients table in a database. To facilitate the interaction, I'm ORDERing BY Name... The pagination buttons in this page are something like: href=".....?Page=7" and when loaded, it will "SELECT * FROM Clients ORDER BY Name LIMIT 7,1" This is working perfectly but now I have a problem. I've done a page to find a client and I display the clients names in a table (Using CSS) but I don't know where to link to??? I apply a query and retrieve let's say 14 clients that match. What should the LIMIT value??? This is what I don't know how to do... Please help? Is there a way to know the position of a certain row if all the rows are selected and in a specific order? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]