Hello Ankur,

On 21-Feb-01 06:09:04, you wrote:

>I am implementing a database application using PHP4 and MSSQL2000. I have a
>database table which has a large no. of tuples. I want to display the data in
>the form of pages with Prev Next buttons.

>I wanted to know if there is some syntax in the MSSQL Select statement which
>can allow me to limit the no. of records being returned. I am lookin at
>functionality which is similar to LIMIT in Mysql.

>for ex, LIMIT 10,10  in MYSQL returns to me a maximum of 10 records starting
>from the 10th record in the returned recordset.

>is there any similar functionality available in MSSQL.

You need to use server side cursors.  You may want to look how that is done
in Metabase, a PHP database independent package that has a function
MetabaseSetSelectedRowRange($database,$first,$limit) that may be used
before executing a query and it works like if you are using the
LIMIT $first,$limit query of MySQL.

You may want get Metabase for free here:

http://phpclasses.UpperDesign.com/browse.html/package/20

You may also want to look into this Query result table display class that
uses this Metabase feature to display query results split in pages:

http://phpclasses.UpperDesign.com/browse.html/package/130

Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to