oops, forgot again...

--
----------
Dan Barton
Terrestrial Program Biologist
Asst. Data Manager
Point Reyes Bird Observatory
http://www.prbo.org
[EMAIL PROTECTED]
[EMAIL PROTECTED]

--- Begin Message ---
Hi again,

Check out the documentation on resources ("cursors"), fetch commands, etc. for
Oracle. I know basically squat about Oracle except that a) I can't afford it, b)
The non-profit I work for can't afford it (the world's #1 oxymoron is "IT at a
non-profit organization"), c) I've never been unable to do anything I wanted to do
with MySQL or PostgreSQL, so I've never needed it and d) their ad campaigns stink
(although they've lessened their push recently... is open-source cutting into
their profit margin$?). I'd suggest checking out the documentation on resources
("cursors"), fetch commands, etc. for Oracle on the php site?

from http://www.php.net/manual/en/function.ora-numrows.php

[EMAIL PROTECTED]
                             27-Dec-2000 09:37

                             It is important to note that this function acts more
as a counter of the
                             number of rows fetched from the cursor. If you
execute this prior to
                             processing the cursor you will always get a 0 for an
answer.

                             The online manual and one of my PHP reference books
does not make that
                             distinction. Some may expect this to count the number
of rows in the
                             cursor prior to processing. This function does not do
that.

Cheers,
db

John Kolvereid wrote:

> Hi Dan,
>     I tried "$n = ora_numcols($odb);
>             echo "number = $n\n";
> This resulted in '0' which I know is incorrect.  It should be '1' = the number
> in the table.  Any other ideas.  Please advise.  Thanks.
>
> Daniel Barton wrote:
>
> > ooops, forgot to reply to list too.
> >
> > --
> > ----------
> > Dan Barton
> > Terrestrial Program Biologist
> > Asst. Data Manager
> > Point Reyes Bird Observatory
> > http://www.prbo.org
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> >
> >   ------------------------------------------------------------------------
> >
> > Subject: Re: [PHP-DB] Oracle functions
> > Date: Mon, 03 Dec 2001 08:46:23 -0800
> > From: Daniel Barton <[EMAIL PROTECTED]>
> > To: John Kolvereid <[EMAIL PROTECTED]>
> > References: <[EMAIL PROTECTED]>
> >
> > Hola,
> >     Check out the php manual for an explanation of resources and arrays etc.
> >
> >     "Resource ID #6" IS the result of your query - PHP stores it as a
> > "Resource." I've only used PostgreSQL and MySQL with PHP, and what you need
> > to do with a query result "resource" using these two databases is "fetch"
> > the data from it using a command such as mysql_fetch_array or mysql
> > _fetch_assoc.
> >     From http://www.php.net/manual/en/ref.oracle.php it looks like you would
> > need to use ora_fetch to convert the "resource" into a PHP array. On this
> > page, there's a code example of how to use PHP's Oracle functions to extract
> > data from a database and output HTML.
> >
> > Cheers,
> > db
> >
> > John Kolvereid wrote:
> >
> > > Hi,
> > >     I am relatively new to Oracle PHP and trying to figure out the
> > > Oracle functions.  I am able to connect and open a db.  But that's the
> > > extent of what I can do w/o further explanation.  Within the PHP docs I
> > > can view all the Oracle functions, but their explanations are sparse to
> > > say the least.   I tried the following:
> > >     $i = ora_do($conn, "Select count(*) from patients");
> > >     echo "returned $i\n";
> > > The statement is valid, I use it all the time in SQL+ and DBI.  However
> > > in PHP it returns 'Resource ID #6'  I am not sure that is a result of
> > > the echo statement or the ora_do function.  Please advise, and let me
> > > know where a better Oracle/PHP document resides.  Thanks.
> > >
> > > --
> > >       John Kolvereid
> > >       http://www.odinfo.com
> > >       http://www.kolvereid.com
> > >       [EMAIL PROTECTED]
> > >       1.610.296.4485
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> > ----------
> > Dan Barton
> > Terrestrial Program Biologist
> > Asst. Data Manager
> > Point Reyes Bird Observatory
> > http://www.prbo.org
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
>
> --
>       John Kolvereid
>       http://www.odinfo.com
>       http://www.kolvereid.com
>       [EMAIL PROTECTED]
>       1.610.296.4485

--
----------
Dan Barton
Terrestrial Program Biologist
Asst. Data Manager
Point Reyes Bird Observatory
http://www.prbo.org
[EMAIL PROTECTED]
[EMAIL PROTECTED]



--- End Message ---
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to