0
배열을 입력 매개 변수로 사용하는 Oracle 저장 프로 시저를 호출하고 있습니다. Owa.vc_arr (varchar2)PHP의 Oracle SP 배열 매개 변수
저는 PHP로 전화를 걸었습니다. 오류가 발생했습니다. 어떤 도움이라도 대단히 감사하겠습니다. 내가 사용하고있는 코드는 아래와 같습니다.
function findSupplier($ptype) {
$proCall = 'BEGIN ICPISSAAPILIB.FIND_SUPPLIER(:P_PRODUCT_TY, :P_RESULTS); End;';
//Step 1: Prepare
$query = oci_parse($this->connect(), $proCall);
// Bind the input P_PRODUCT_TY argument to the $prodType PHP variable
$ptype = oci_new_collection($this->connect(),'vc_arr');
oci_bind_by_name($query,":P_PRODUCT_TY",$ptype,-1);
// Create a new cursor resource
$supplier_res = oci_new_cursor($this->connect());
// Bind the cursor resource to the Oracle argument
oci_bind_by_name($query,":P_RESULTS",$supplier_res,-1,OCI_B_CURSOR);
//Now Execute statement
oci_execute($query);
// cursor
oci_execute($supplier_res);
//Here boy, fetch
while ($items = oci_fetch_assoc($supplier_res)) {
$results[] = $items;
}
//returns multidimentional array containing cust_id, company_nm, street1,
// street2, street 3, p_origin_longitude, p_radius, p_name
return $results;
}
오류를 공유 하시겠습니까? –