fetch out of sequence

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rod

    fetch out of sequence

    Hi,

    I would like to know if there is a similar function with OCI8 (oracle) to
    this one: mysql_data_seek ?

    I would like to do twice:
    while (ocifetch($stmt )) {
    ....
    }

    How can I set the cursor to the first element?

    Thanks your for your help

    Rodolphe




  • Andy Hassall

    #2
    Re: fetch out of sequence

    On Thu, 20 Nov 2003 09:41:27 +0100, "Rod" <toto@toto.co m> wrote:
    [color=blue]
    >I would like to know if there is a similar function with OCI8 (oracle) to
    >this one: mysql_data_seek ?
    >
    >I would like to do twice:
    >while (ocifetch($stmt )) {
    >...
    >}
    >
    >How can I set the cursor to the first element?[/color]

    Scrollable cursors were only introduced in Oracle 9i; as far as I know, the
    PHP interface hasn't been updated to support the new calls to navigate within a
    result set.

    So you can only fetch forwards. If you want to go back, you will have to have
    stored the results in an array yourself, or re-execute the query.

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    • Rod

      #3
      Re: fetch out of sequence

      thanks you for your answer.

      Rodolphe

      "Andy Hassall" <andy@andyh.co. uk> wrote in message
      news:0j5qrv4nmr vrlkh35iru2f7ae 5ifgdmckm@4ax.c om...[color=blue]
      > On Thu, 20 Nov 2003 09:41:27 +0100, "Rod" <toto@toto.co m> wrote:
      >[color=green]
      > >I would like to know if there is a similar function with OCI8 (oracle) to
      > >this one: mysql_data_seek ?
      > >
      > >I would like to do twice:
      > >while (ocifetch($stmt )) {
      > >...
      > >}
      > >
      > >How can I set the cursor to the first element?[/color]
      >
      > Scrollable cursors were only introduced in Oracle 9i; as far as I know,[/color]
      the[color=blue]
      > PHP interface hasn't been updated to support the new calls to navigate[/color]
      within a[color=blue]
      > result set.
      >
      > So you can only fetch forwards. If you want to go back, you will have to[/color]
      have[color=blue]
      > stored the results in an array yourself, or re-execute the query.
      >
      > --
      > Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
      > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)[/color]


      Comment

      Working...