473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

oracle function

Hi all

I use php with oracle database and i need function like mysql_data_seek
i need to set the result pointer to the row number I need.
can anyone help me?

Thank you

Chripa
Jul 17 '05 #1
5 3030
On 2 Apr 2004 01:00:41 -0800, ch****@volny.cz (chripa) wrote:
I use php with oracle database and i need function like mysql_data_seek
i need to set the result pointer to the row number I need.
can anyone help me?


There isn't one. If you want to go backwards, save your rows in PHP array and
use that instead.

Oracle 9i's OCI supports "Scrollable Cursors" which would allow you to go back
and forth through result sets, rather than the normal and more efficient
forward-only streaming of rows as soon as they're available. But PHP hasn't
implemented support for them, unless it's been added very recently.

The Oracle manual also states:

"Note:

Do not use scrollable cursors unless you require the functionality, because
scrollable cursors use more server resources and can have greater response
times than non-scrollable cursors."

What is the problem that you are trying to solve that requires seeking back
through the result set?

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #2
Andy Hassall <an**@andyh.co.uk> wrote in message news:
What is the problem that you are trying to solve that requires seeking back
through the result set?


I need to display, for example, ten rows of the result and after
clicking on next display another ten.
I used to do that with mysql using the mysql_data_seek()
Chripa
Jul 17 '05 #3
In article <35**************************@posting.google.com >,
ch****@volny.cz (chripa) wrote:
I need to display, for example, ten rows of the result and after
clicking on next display another ten.
I used to do that with mysql using the mysql_data_seek()
Chripa


For what it's worth, after writing a few of these 'paging' functions
myself (using MySQL 'LIMIT' in the query), I decided to standardize on
the DB_Pager module from PEAR. It does all the tedious calculation
needed to build next/previous/first/last/intermediate links.

<http://pear.php.net/package/DB_Pager>

JP

--
Sorry, <de*****@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.
Jul 17 '05 #4
On 4 Apr 2004 01:53:00 -0800, ch****@volny.cz (chripa) wrote:
Andy Hassall <an**@andyh.co.uk> wrote in message news:
What is the problem that you are trying to solve that requires seeking back
through the result set?


I need to display, for example, ten rows of the result and after
clicking on next display another ten.
I used to do that with mysql using the mysql_data_seek()


It sounds like you're fetching the entire result set then only using some of
it - this isn't very efficient.

You should limit the result set to just those records you want. For Oracle,
you could look into using ROWNUM or the ROW_NUMBER() analytic function.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #5
Andy Hassall <an**@andyh.co.uk> wrote in message news:<d8********************************@4ax.com>. ..
On 4 Apr 2004 01:53:00 -0800, ch****@volny.cz (chripa) wrote:
Andy Hassall <an**@andyh.co.uk> wrote in message news:
What is the problem that you are trying to solve that requires seeking back
through the result set?


I need to display, for example, ten rows of the result and after
clicking on next display another ten.
I used to do that with mysql using the mysql_data_seek()


It sounds like you're fetching the entire result set then only using some of
it - this isn't very efficient.

You should limit the result set to just those records you want. For Oracle,
you could look into using ROWNUM or the ROW_NUMBER() analytic function.


If you decide not to use DB_Pager, perhaps the query under the
"and we said..." heading in
http://asktom.oracle.com/pls/ask/f?p...127412348064,Y
will be useful. Lower down there is also some interesting
discussion about how to be innaccurate to save time.
-- CJ
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no...
0
by: Bryan Jackson | last post by:
Greetings, (I am an Oracle newbie -- been working with SQLServer for quite some time, however. I'm using Oracle9i and Oracle9i JDeveloper v9.0.3.1 (build 1107) for my programming environment)....
4
by: Roger Redford | last post by:
Dear Experts, I'm attempting to marry a system to an Oracle 817 datbase. Oracle is my specialty, the back end mainly, so I don't know much about java or javascript. The system uses javascript...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
9
by: mcbill20 | last post by:
Hello all. I just installed Oracle 10g developer tools on a machine running XP Pro and Office XP. Before this I had just the Oracle 9 client installed. I the previous configuration, I was able to...
0
by: petro | last post by:
I am trying to deploy an asp.net application to my web server. My application uses system.data.oledb to connect to an oracle database. On my development machine I have the oracle client 10g...
4
by: BookerW | last post by:
I am not sure which forum I should post this on, but here is the problem. I have a front end web application(VB) on asp,net 1.1 framework. Inside of the code, I have the following lines to...
0
by: bw171 | last post by:
Hopefully, I frame this problem/question correctly. I have some code written/updated in visual studio 2003. This code when setup on other machines where I have installed the Oracle 9i client, and...
1
by: =?Utf-8?B?Ym9va2VyQG1ndA==?= | last post by:
Hopefully, I frame this problem/question correctly. I have some code written/updated in visual studio 2003. This code when setup on other machines where I have installed the Oracle 9i client,...
8
by: colmkav | last post by:
Can someone tell me how I can access the return value of a function called from Oracle as opposed to a store proc from oracle? my oracle function is get_num_dates_varposfile. I am only used to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.