Page 1 of 1

Pagination with mssql

Posted: Sun Apr 23, 2006 8:44 am
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 :?: