note 101168 added to function.oci-bind-array-by-name

From: Date: Tue, 30 Nov 2010 19:50:39 +0000
Subject: note 101168 added to function.oci-bind-array-by-name
Groups: php.notes 
Request: Send a blank email to php-notes+get-174491@lists.php.net to get a copy of this message
I try to use this function but oci_bind_array_by_name() don't support ARRAY TYPES from Oracle :( Example: -- Oracle Side - Extract of package declaration: TYPE T_REFCUR IS REF CURSOR; TYPE STR_FIELDS IS VARRAY(30) OF VARCHAR2(30); FUNCTION GETDATA(p_id IN NUMBER, p_fields IN STR_FIELDS) RETURN T_REFCUR; -- Apache Server Side - Extract of PHP code: ... $fields[]="One"; $fields[]="Two"; $fields[]="Three"; $ps = oci_parse($connection, "begin :cursor := PKG.GETDATA(:id , :fields); end;"); ... //I only write here the bind of ":fields"... oci_bind_array_by_name($ps, ":fields", $fields, count($fields), -1, SQLT_CHR); $result = oci_execute($ps); ERROR: ORA-06550: line XX, column XX: PLS-00306: wrong number or types of arguments in call to 'GETDATA' ORA-06550: line XX, column XX: PL/SQL: Statement ignored ---- Server IP: 201.216.232.3 Probable Submitter: 190.210.112.40 ---- Manual Page -- http://www.php.net/manual/en/function.oci-bind-array-by-name.php Edit -- https://master.php.net/note/edit/101168 Del: integrated -- https://master.php.net/note/delete/101168/integrated Del: useless -- https://master.php.net/note/delete/101168/useless Del: bad code -- https://master.php.net/note/delete/101168/bad+code Del: spam -- https://master.php.net/note/delete/101168/spam Del: non-english -- https://master.php.net/note/delete/101168/non-english Del: in docs -- https://master.php.net/note/delete/101168/in+docs Del: other reasons-- https://master.php.net/note/delete/101168 Reject -- https://master.php.net/note/reject/101168 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174491) next »