Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vaishjan
Starting Member
8 Posts |
Posted - 2005-03-02 : 10:14:24
|
Hi, I'm using PHP with Smarty Template for entire process. Based on my selection of country, state like India, Karnataka, i'll be getting some x records. I wanted 10 records to be placed in each page. (Split process) I'm using SQL SERVER 2000 as my back end. I have come across a query for MySQL as: Select * from tablename where condition ORDER BY name ASC LIMIT $page, $limitsince ms sql doesn't have LIMIT i'm unable to go further on splitting . Do provide me an example code for split process using ms sql server as back end. Thx in advance |
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2005-03-02 : 12:41:53
|
In your case, would it make sense to retrieve all the records from the database in one go,and then split into parallell processes to create the pages ?I think that would be faster as well.You can search for "paging" here in the forums.And read this: [url]http://weblogs.sqlteam.com/jeffs/archive/2004/03/22/1085.aspx[/url]rockmoose |
|
|
vaishjan
Starting Member
8 Posts |
Posted - 2005-03-03 : 07:54:10
|
Hi, Thx for ur valuable code. Can i get a sample code for mssql_data_seek(). mssql_data_seek(resource result,int row number) i'm passing the result of the executed query after the use of mssql_fetch_row() as $res = mssql_fetch_row($resqry); mssql_data_seek($res,4);is the above code right? & does this get me the 4th record / row in the result when the return of mssql_data_seek() is true. Plz do enlighten me for the above code with an example .Thx in advance |
|
|
|
|
|