Re: [GENERAL] Working with pages of data (LIMIT/OFFSET keyword)

2010-06-20 Thread Szymon Guz
2010/6/20 AI Rumman > I am using a PHP client. Is there a way to do the above task with php? > > > Sure, perform two queries in one transaction. regards Szymon Guz

Re: [GENERAL] Working with pages of data (LIMIT/OFFSET keyword)

2010-06-19 Thread AI Rumman
I am using a PHP client. Is there a way to do the above task with php? On Thu, Jun 17, 2010 at 11:38 PM, Francisco Figueiredo Jr. < franci...@npgsql.org> wrote: > I would go with 2). > > Npgsql supports multiple resultsets. You can pass a query separated by > semicolon ';' or you can use a proce

Re: [GENERAL] Working with pages of data (LIMIT/OFFSET keyword)

2010-06-17 Thread Mike Christensen
Sweet! I knew there was a way to do this, I'll mess around with it more in a bit. On Thu, Jun 17, 2010 at 10:38 AM, Francisco Figueiredo Jr. wrote: > I would go with 2). > > Npgsql supports multiple resultsets. You can pass a query separated by > semicolon ';'  or you can use a procedure call wh

Re: [GENERAL] Working with pages of data (LIMIT/OFFSET keyword)

2010-06-17 Thread Francisco Figueiredo Jr.
I would go with 2). Npgsql supports multiple resultsets. You can pass a query separated by semicolon ';' or you can use a procedure call which return a setof refcursor. On both ways, you will need to call NextResult in your Datareader just like with SQLServer. You can check our user manual: htt

Re: [GENERAL] Working with pages of data (LIMIT/OFFSET keyword)

2010-06-16 Thread Szymon Guz
2010/6/16 Mike Christensen > I'm generating a query on the fly to return a set of data, however I > only want to display 30 rows at a time to the user. For this reason, > I use the LIMIT 30 OFFSET x clause on the select statement. However, > I also want to know the total rows that match this qu

[GENERAL] Working with pages of data (LIMIT/OFFSET keyword)

2010-06-16 Thread Mike Christensen
I'm generating a query on the fly to return a set of data, however I only want to display 30 rows at a time to the user. For this reason, I use the LIMIT 30 OFFSET x clause on the select statement. However, I also want to know the total rows that match this query had there been no limit, that way