Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PHP oracle fetch out sequence !
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 toolReceived on Thu Dec 08 2005 - 13:02:26 CST
![]() |
![]() |