Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PHP oracle fetch out sequence !

Re: PHP oracle fetch out sequence !

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Thu, 08 Dec 2005 19:02:26 +0000
Message-ID: <ml0hp1pf655kunoc15neotsrdkq8b88d7e@4ax.com>


On Thu, 8 Dec 2005 14:41:14 +0100, "Manu" <pipo_at_pipo.com> wrote:

>i do a SQL request, next i fetch all my records (do my code) but after my
>first fetch out i need to restart this fetch. How do ?
>like this :
>while ( $mr = oci_fetch_assoc ($cursor ) ) {
> //my first code
>}
>//seach a solution like :
>//$cursor->rewind();
>//$cursor->seek(0);
>//$cursor->fetch(0);
>while ( $mr = oci_fetch_assoc ($cursor ) ) {
> //my second code
>}

 You'll need to either execute the query again, since PHP doesn't support OCI scrollable cursors, or save the data in an array on the first pass and iterate through that instead on the second pass.

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Thu Dec 08 2005 - 13:02:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US