Do you have access to the machine with the SQL server on it? If so, the "Books Online" for SQL Server is probably installed, and it's actually a really good reference manual.
Here's a rough example of what the procedure might look like:
CREATE PROCEDURE procedureName
@currentpage int,
@pagesize int,
@ordercolumn varchar(250)
AS
DECLARE @TempResults table
(
trim_col int IDENTITY(1,1),
column1 int,
column2 varchar(100),
column3 text
);
DECLARE @endlimit int, @beginlimit int;
SET @endlimit = @currentpage * @pagesize;
SET @beginlimit = @endlimit - @pagesize;
INSERT INTO @TempResults (column1, column2, column3)
SELECT * FROM WhateverTable;
DELETE FROM @TempResults WHERE trim_col > @endlimit OR trim_col <= @beginlimit;
DECLARE @sql varchar(2000);
SET @sql = 'SELECT * FROM @TempResults ORDER BY ' + @ordercolumn;
EXEC(@sql);
GO
That's a very crude example that I just made up, but you should get the idea. Obviously column/table names and datatypes would need to be altered to fit your needs.
In your (PHP) code you would just use a query similar to:
$sql = "EXEC procdedureName " . $currentpage . "," . $pagesize . "," . $ordercolumn;
It should be noted that another advantage to using the stored procedure to provide the paging logic, is that it becomes language-neutral on the business logic side. You could use PHP, ASP, CFM, etc... and it would just be a simple query (instead of involving something language/platform-specific like ADO recordsets and the like). On the flip side, one disadvantage is the stored procedure is not immediately portable to another RDBMS (especially not MySQL -- no stored procs yet), and some porting work would be required to gain similar functionality in PostgreSQL or Oracle or whatever.