Re: "LIMIT" problem MSSQL

From: Date: Wed, 19 Feb 2003 16:14:16 +0000
Subject: Re: "LIMIT" problem MSSQL
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-25768@lists.php.net to get a copy of this message
i'm not using a fixed sort tnx noam "Adam Voigt" <adam@cryptocomm.com> wrote in message news:1045670876.2091.24.camel@beowulf.cryptocomm.com... Assuming your sorting by id, just do: SELECT TOP 50 * FROM TABLE WHERE id > $lastid And just have lastid posting to the page every time they hit next, and in lastid, put the last id of the results on that page. On Wed, 2003-02-19 at 09:59, Noam Giladi wrote: I'm trying to split results into different pages and number the pages accordingly. I've been able to build a fairly intelligent page numbering system which knows which rows it should pull (at least by numbering each row numerically) but I don't know how to construct a SQL query to pull 10 results starting at a certain number. please did anyone wrote a proc that do it?. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt (adam@cryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc

« previous php.db (#25768) next »