I have an Oracle procedure
create or replace PROCEDURE PREVISAO_CHEGADA(PONTO IN number, LINHA IN number, ROTA IN number, RETORNO OUT POSICAO_ONIBUS_TAB) IS ...
where out parameter POSICAO_ONIBUS_TAB is an array of POSICAO_ONIBUS and POSICAO_ONIBUS is
create or replace TYPE POSICAO_ONIBUS AS OBJECT (LOGP_CODIGO NUMBER, VEIC_CODIGO NUMBER, PROX_VIAG VARCHAR2(5), distancia NUMBER);
I need to call this procedure with PHP, but I'm getting the error:
oci_execute(): ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'PREVISAO_CHEGADA' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
follows PHP code below:
$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)))(CONNECT_DATA=(SID=mydb)))";
$conn = oci_connect("user", "password", $db, 'WE8ISO8859P1');
$sql = 'BEGIN previsao_chegada(:ponto, :linha, :rota, :retornos); END;';
$stmt = oci_parse($conn,$sql);
oci_bind_by_name($stmt,':ponto',$ponto,10);
oci_bind_by_name($stmt,':linha',$linha,10);
oci_bind_by_name($stmt,':rota',$rota,10);
oci_bind_array_by_name($stmt,':retornos',$retornos, 100, 100, SQLT_CHR);
$ponto = 391;
$linha = 280;
$rota = 0;
$retornos = array();
oci_execute($stmt);