Pagination with mssql

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
maxxer
Forum Newbie
Posts: 1
Joined: Sun Apr 23, 2006 8:36 am

Pagination with mssql

Post by maxxer »

Hi all, I have a problem. I would like to do a pagination with mssql(SQL SERVER), I know in Mysql I can use limit and in SQL server I can use Top.
But I use more table Hom I can do?
The query in SQL SERVER :

SELECT * TOP 5 from(
SELECT * TOP 5 from(
SELECT * from table1 order by name_field asc
) as foo
) as baz

I wish that I must work in this way.
If somewone can give me a code PHP with a sql examples.
Thank's

Tom :?:
Post Reply