Hello Doug,
On 16-Apr-01 01:29:30, you wrote:
>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.
You may want to try Metabase. It is a database abstraction package that
has a feature that makes all database work like as if all supported
databases, including Oracle with OCI, had the LIMIT clause like MySQL.
The way it works is just by calling before executing a query:
MetabaseSetSelectedRowRange($database,$first,$limit)
where $database is a previously set up Metabase $database handle, $first
is the first row you want to fetch and $limit is the number of rows you
want to fetch for this query. In your case $limit should be one.
You may download Metabase for free with documentation and a tutorial from
here:
http://phpclasses.UpperDesign.com/browse.html/package/20
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 Database 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]