I have a question related to using ora_bind. I'm now trying to call an oracle function but I can't figure out how to obtain the value returned from it. Code is as follows:
$output = 0;
$query = "declare a varchar(2); begin a:=BF\$PETITION.check_password('$username', '$pass'); end;";
$conn=ora_logon("xxx@xxx","xxx");
$cursor=ora_open($conn);
ora_parse($cursor, $query);
ora_bind($cursor, "output", ":a", 1);
I understand that I need to use bind to bind the oracle var to a PHP var.. but I keep getting this error:
Warning: Ora_Bind failed (ORA-01036: illegal variable name/number -- while processing OCI function OBNDRA)