Re: "LIMIT" problem MSSQL
| From: | Adam Voigt | Date: | Wed, 19 Feb 2003 16:18:18 +0000 |
| Subject: | Re: "LIMIT" problem MSSQL | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25770@lists.php.net to get a copy of this message | ||
Well if you do, (sort by id) this will work.
On Wed, 2003-02-19 at 11:14, Noam Giladi wrote:
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
--
Adam Voigt (adam@cryptocomm.com)
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc