Re: [phplib] [PHPLIB] Help getting results from OCI8 From: Mikhail Avrekh (ami <email protected>)
Date: 06/24/00

HI,

I had the same problem. The thing is that next_record in db_oci8 forces
all column names to lowercase, so you should say in your program:

$udb->f("id"); $udb->f("first"); etc....

Regards,

Misha

On Fri, 23 Jun 2000, Kevin Porterfield wrote:

> This could prove to be very embarrassing but I cannot for the life of me
> figure out what is going on...
>
> *WAS* running successfully:
> PHP4.0.1
> phplib72 using db_mysql.inc
> Mysql
> Apache
> Linux
>
> I spent the day transferring everything over to a new environment:
> PHP4.0.1
> phplib72 *using db_oci8.inc*
> Oracle8i
> Apache
> Linux
>
> I have gotten through thew hard part of transferring the data over and
> getting phplib configured correctly for Oracle. However... now while the
> connections to Oracle happens with no problem (shown with debug=true) I
> cannot extract the fields from the database to variables in PHP. I will
> document by showing my simplest example:
>
> <?
> $udb = new DB_Foo; //LINK FOR USER INFO
> $udb->query ("SELECT ID,FIRST,LAST FROM CLIENT_USERS WHERE
> USERNAME='jsmith'");
> while ($udb->next_record()) {
> $userid=$udb->f["ID"];
> $userfirst=$udb->f("FIRST");
> $userlast=$udb->f("LAST");
> $userfull="$userfirst $userlast";
> }
> print "userid:$userid<BR>";
> ?>
>
> Albeit, this is a very crude example, but it displays none of the records.
> With debugging turned on I can see that the item is there and was
> selected...
>
> Connecting to FOOBAR...
>
> Obtained the Link_ID: Resource id #3
> Debug: query = SELECT ID,FIRST,LAST FROM CLIENT_USERS WHERE
> USERNAME='jsmith'
> [ID]:99
> [FIRST]:John
> [LAST]:Smith
> userid:
>
> This is driving me crazy... Could it be the db_oci8 module is not yet
> "stable". Should I regress back to db_oracle? Anything would be helpful.
> Thanks much in advance...
>
> kp
> kpmd <email protected>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>