(11-29-2021, 07:51 AM)rocksvern Wrote: (11-23-2021, 09:07 AM)gurthang75 Wrote: HI again!
im having troubles with package/procedures executions when i got OUT variables in my package i dont know how to retrieve the returning OUT variable value.
Can someone gide me a bit? im foing this:
Code:
function addSection($parent_section, $sec_code, $sec_long){
$params[0] = array('name' => ':P_PARENT_SEC', 'value' => $parent_section);
$params[1] = array('name' => ':P_CODE', 'value' => $sec_code);
$params[2] = array('name' => ':P_LONG', 'value' => $sec_long);
$params[3] = array('name' => ':P_OPER', 'value' => 'add');
$params[4] = array('name' => ':P_RESULT', 'value' => null, 'length' => 4000);
$params[5] = array('name' => ':P_ERROR', 'value' => null, 'length' => 4000);
$params[6] = array('name' => ':P_ERROR_ORA', 'value' => null, 'length' => 4000);
$query = $this->db->storedProcedure('PAC_WIKI', 'WIKI_SECTION', $params);
print_r($query);
die();
if ($this->db->transStatus() === false) {
return $query;
} else {
return $query;
}
}
and that "print_r()" give me this array:
Code:
CodeIgniter\Database\OCI8\Result Object ( [connID] => Resource id #12 [resultID] => Resource id #13 [resultArray] => Array ( ) [resultObject] => Array ( ) [customResultObject] => Array ( ) [currentRow] => 0 [numRows:protected] => [rowData] => )
thks in advance!
Try put a variable by reference like this
Code:
'value' => &$resultVariable
WORKS PERFECLY!!
however... it works with my changes... do u know if the team has come to a hotfix?