cycling through postgres result sets page by page

From: Date: Mon, 23 Oct 2000 01:30:53 +0000
Subject: cycling through postgres result sets page by page
Groups: php.db 
Request: Send a blank email to php-db+get-3850@lists.php.net to get a copy of this message
I have an application where I need to pull data sorted by date from a big table that happens to reside on a postgres server. I want to show the first X (say, 50) results on the first page, and then let the user click cute little next >> and previous << buttons at the bottom of the page to display the results. I would like to do this by making a result variable a persistent session variable, but I have a feeling that you can't persist a pg result with a session variable, because they are destroyed at the end of the script. So, does anyone have any ideas of how I can accomplish this. Take into account the fact that I have no control over the table structure because it's populated from a third party too. Also, I have to be able to access the results in nearly any order depending on what the user specifies as the sorting criteria, so I can't just use oid's as delimiter. Plus, if I have to re-execute the query for each page view, I might grab new additional rows since the table is being updated constantly by this third party tool. Anyone have any good suggestions? Thanks in advance. seb sblake@cox.rr.com

« previous php.db (#3850) next »