Am I implementing this query correctly with PHP?
I have already reviewed the connection data and they are correct, I propose my query based on the official documentation of PHP, however I do not obtain the expected result, in advance I thank you for your support.
Query that shows me results directly in console:
SET SERVEROUTPUT ON
DECLARE
num_N_ACCOUNT_ID NUMBER;
num_N_OVERDRAFT NUMBER;
dt_D_OVERDRAFT_END DATE;
BEGIN
SI_USERS_PKG_S.GET_ACCOUNT_CREDIT(
num_N_ACCOUNT_ID => 148664791,
num_N_OVERDRAFT => num_N_OVERDRAFT,
dt_D_OVERDRAFT_END => dt_D_OVERDRAFT_END
);
DBMS_OUTPUT.PUT_LINE(num_N_OVERDRAFT);
DBMS_OUTPUT.PUT_LINE(dt_D_OVERDRAFT_END);
END;
Implemented with PHP
$sql=" SET SERVEROUTPUT ON
DECLARE
num_N_ACCOUNT_ID NUMBER;
num_N_OVERDRAFT NUMBER;
dt_D_OVERDRAFT_END DATE;
BEGIN
SI_USERS_PKG_S.GET_ACCOUNT_CREDIT(
:num_N_ACCOUNT_ID,
:num_N_OVERDRAFT,
:dt_D_OVERDRAFT_END
);
END;";
$account = 148664791;
$stid = oci_parse($conn, $sql);
oci_bind_by_name($stid, ':num_N_ACCOUNT_ID', $account);
oci_bind_by_name($stid, ':num_N_OVERDRAFT', $cantidad,20);
oci_bind_by_name($stid, ':dt_D_OVERDRAFT_END', $fecha,20);
oci_execute($stid);
print "$cantidad\n";