Re: Oracle session cursor

From: Date: Mon, 16 Apr 2001 08:12:58 +0000
Subject: Re: Oracle session cursor
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-8592@lists.php.net to get a copy of this message
Hi ! I think the only way to do one query is DO one query into the sesission variable array and create index of current shown row and so you will get it works. session_register ("storage_array"); storage_array = array(); session_register("curr_idx"); $curr_idx=-1; # your select here into storage_array, now you get # storage_array["COLUMN_NAME"][0] = something so in client's page you write: echo storage_array["COLUMN_NAME"][$curr_idx]; $curr_idx++; By, Aleksey ""Doug Schasteen"" <dschast@escindex.com> wrote in message news:001d01c0c62e$4b7aace0$b1045ad1@doug... As you all know, PHP is stateless. Meaning that once the script ends, all connections are closed and the program is done. I have a project where I need to do just 1 query to oracle, but only get one row per page. So on the first page it does the query and says "20 results total" and shows the first selected row. Then I click next and it brings up the second row. I'm only supposed to show one row at a time. I can probably cheat and parse the query on each page, but I'd like to find out from you nice folks if its possible to do it with just one query. My guess is that I would be using a persistant OCI connection and an oracle package/procedure, but I'm not familiar with either of those enough to know if its possible or not. Or maybe I could store my parsed query in a PHP4 session? Thats another thing I am not very familiar with at this time. Any info would be helpful. This project is due on wednesday so I need the help ASAP. Thanks. - Doug Schasteen

« previous php.db (#8592) next »