0

I am trying to use a PHP variable instead of using Oracle Variable. Now the code is as follows:

declare
    V_EXAMCAT_MAP_ID varchar2(16);
begin
    PRC_BUILD_PK ('', 'SEQ_NM_APPLICATION', 'T', '1', V_EXAMCAT_MAP_ID,'Y');
end;
/

Now in the above code, V_EXAMCAT_MAP_ID is returning T180801000010 I want to use PHP variable instead of V_EXAMCAT_MAP_ID to get the result in a PHP variable of the procedure.

Is it possible? if possible please help me

2

1 Answer 1

1

See "Binding Parameters in PL/SQL Procedure Calls" on p192 of the free http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html

For example, to get a string from a PL/SQL procedure 'OUT' parameter, you would use something like:

$s = oci_parse($c, "begin toyshop.find_toy_proc(:id, :name); end;");
$id = 1;
oci_bind_by_name($s, ":id", $id);
oci_bind_by_name($s, ":name", $name, 40);
oci_execute($s);
echo "Name is: ".$name;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.