php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54553 OCI-Collection::getelem() Unknown or unsupported type of element
Submitted: 2011-04-18 02:21 UTC Modified: 2017-10-24 07:56 UTC
Votes:6
Avg. Score:4.2 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:0 (0.0%)
From: richard dot strba at email dot cz Assigned:
Status: Open Package: OCI8 related
PHP Version: 5.3.6 OS: Windows XP Professional SP3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: richard dot strba at email dot cz
New email:
PHP Version: OS:

 

 [2011-04-18 02:21 UTC] richard dot strba at email dot cz
Description:
------------
function OCI-Collection::getelem() returns "Unknown or unsupported type of element: 108 when collection returned from oracle sql stored function. database version is 10g Release 2

Test script:
---------------
SQL:
CREATE TABLE AAAPOKUS2 ("COLUMN1" VARCHAR2(20 BYTE) ) TABLESPACE "USERS" ;
CREATE OR REPLACE TYPE AAATYPE1 AS object ( column1 VARCHAR2(20 CHAR) );
CREATE OR REPLACE TYPE AAATYPE1_TABLE is table of AAATYPE1;
CREATE OR REPLACE FUNCTION FUNCTION3
(
  PARAM2 OUT AAATYPE1_TABLE
) RETURN number AS
BEGIN    
  SELECT AAATYPE1(column1)
  bulk collect into PARAM2 FROM 
    AAAPOKUS1;
  RETURN 8;
END FUNCTION3;

PHP:
$query = " BEGIN :v_Return := FUNCTION3(:PARAM2);end;\n";
$s = oci_parse($conn, $query);
$var3 = ' 3';
$collection = oci_new_collection($conn,"AAATYPE1_TABLE","KSM");
oci_bind_by_name($s, ":PARAM2", $collection,-1,OCI_B_NTY);
oci_bind_by_name($s, ":v_Return", $var3);
oci_execute($s, OCI_DEFAULT);

echo($collection->size());
$elem = $collection->getElem(1);

Expected result:
----------------
expected is some values (array of values) returned from stored function

Actual result:
--------------
false

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-18 10:31 UTC] johannes@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: sixd
 [2011-04-18 19:00 UTC] sixd@php.net
-Type: Bug +Type: Feature/Change Request
 [2017-10-24 07:56 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: sixd +Assigned To:
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC