By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

fetch out of sequence

P: n/a
Rod
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


Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Thu, 20 Nov 2003 09:41:27 +0100, "Rod" <to**@toto.com> wrote:
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?


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 (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #2

P: n/a
Rod
thanks you for your answer.

Rodolphe

"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:0j********************************@4ax.com...
On Thu, 20 Nov 2003 09:41:27 +0100, "Rod" <to**@toto.com> wrote:
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?
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 (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.