Connecting Tech Pros Worldwide Help | Site Map

PHP - ORACLE - VARRAY

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 12:14 PM
PedroSilva
Guest
 
Posts: n/a
Default PHP - ORACLE - VARRAY

I need to know how to get a collection (varray), basically it's an
array of chars with size of 9999 positions, from oracle so I can use
it as an array with php. There's very little documentation about it.
The only thing I found was
http://conf.php.net/pres/slides/oci/paper.txt , but only talks about
putting an array on the database, not getting it.

I tried this:
$arr = OCINewCollection($db,'VARCHAR2_V','SCHEMA');
$stmt=ociparse($db,$query_sql);
OCIDefineByName($stmt,'VFIELD',$arr);
OCIExecute($stmt);

But no luck.
VARCHAR2_V is the varray type.
The variable $query_sql is a simple SELECT of the VARRAY, and in SQL
Navigator works just fine.

print $arr->size()."\n";
Just says that the size is 0.

Is there a way to get the array, with php commands or sql?

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.