-1
I am trying to communicate PHP with the Caché database of Intersystems, but I will need to use ODBC to communicate.
My doubt is how I can get PHP to return Procedure, in the case of a String, I’m already able to execute successfully, but the return I do not know how to get. I’m using the functions odbc_prepare
and odbc_execute
.
My connection to the Database
$usu='usuario';
$senha='senha1234';
$connection_string = 'Driver={InterSystems ODBC35};server=localhost;port=1972;database=MEUBD;protocol=TCP;static cursors=1';
$connection = odbc_connect($connection_string,$usu,$senha);
Execution of my Procedure
<?php
$sqlExecutar = '{CALL %MeuModulo.MinhaClasse_MinhaProcedure(?,?,?)}';
$exc = odbc_prepare($connection, $sqlExecutar);
$par1='Parametro 1';
$par2='Parametro 2';
$par3='Parametro 3';
$result = odbc_execute($exc,array($par1,$par2,$par3));
?>
$result
comes back with the value True
How do I get the feedback from Procedure? In case it is returning the word "SUCESSO NA EXECUÇÃO"
. Is there any method odbc
?
Thanks.