Try something like:
SELECT TOP 1 Field1, Field2, Field3,.....Field99 FROM TableName ORDER BY Field1 DESC (found at: http://www.sitepoint.com/forums/showpost.php?p=720858&postcount=4) Or: <quote> The following example displays 50 results per page, and I use a Page_Number variable that is incremented/decremented based on a user clicking "Next Page" or "Previous Page" links, or a GoTo Page Number Dropdown in the CGI. SELECT * FROM (SELECT TOP 50 * FROM (SELECT TOP (50 * Page_Number) * FROM tablename ORDER BY ######) y ORDER BY ###### DESC) x ##### = the column(s) you want to order by. You have to think a bit out of the box here, as the resultset is in "reverse" order... :) After you execute this query, you execute a "MoveLast" on the result set. Then set up a loop to: Display whatever based on the resultset then execute a MovePrevious on the resultset I've found this routine is very efficient working with large resultsets that contain thousands of rows. In a paging environment in a CGI, if you have to move forward through the resultset to get to the correct row, to begin displaying the 150th page, etc.. It is a huge waste of processor and bandwidth... </quote> (found at: http://www.webmasterworld.com/forum10/7660.htm) Hope those help you. Cheers, Keith. Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
