Record Paging sqlServer/odbc
| From: | Lerp | Date: | Wed, 09 Jan 2002 18:37:20 +0000 |
| Subject: | Record Paging sqlServer/odbc | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-76482@lists.php.net to get a copy of this message | ||
Hi all, I have a small php app where I'd like to incorporate page throughs
of records, say 10 at a time.
I'm using sqlServer and have run into a problem using the LIMIT statement
within my query.
SQL Code:
$sqls = "SELECT consultantid, firstname, lastname, city, country, category,
yearsexp FROM CONSULTANT ORDER BY consultantid DESC LIMIT $var1, $var2" ;
So how the heck do I get around this problem since I've discovered that the
LIMIT statement will not work with sqlServer??? :)
I've heard of people using the TOP keyword and doing it that way, but I am
unable to locate a similar example.
Thx a bunch :) Joe
p.s. Sorry for the cross-post, seemed like the other server wasn't working
properly