Hi Guys,
i created a stored Procedure for db2 9.7 which has an array input parameter type.
Code:
CREATE TYPE keywords VARCHAR(30) ARRAY[200];
CREATE PROCEDURE search(IN keywordsIn keywords)
...
DYNAMIC RESULT SETS 1
...
DECLARE x CURSOR FOR
SELECT * FROM UNNEST(keywordsIn) AS k(title);
OPEN x;
...
I call the Procedure within a php file as a prepared statement and tried to bind a test array
PHP Code:
$testArray = array("a","b","c")
either explicitly via
and
PHP Code:
db2_execute($stmt,array($testArray))
.
The Problem ist: PHP doesn't seem to correctly hand over the parameter to the SP as an Array. When i print the result via db2_fetch_rows() to the screen, it says:
, just as if i would have called
PHP Code:
echo $testArray
.
Does anyone know how to achieve passing an array to a SP via PHP? Or ist it just not possible?