I'm having a little trouble getting the results from a stored procedure call to an ODBC connection.
I'm not used to calling stored procedures through ODBC from PHP, and I find the documentation incomplete (or maybe i'm missing something).
The code below seems to be working. But I can't find a way to fetch the result from $result
.
$connect = odbc_connect("dsn","user","password");
$statement = "storedprocedure('IN value','OUT value_1','OUT value_2')";
$result = odbc_exec ($connect,$statement);
odbc_close($connect);
If I echo $result;
it passes me a "Ressource id#" so something seems to work. But I can't figure out the fetch part :)
Your call worked and odbc returned you a resource ref from which you then need to fetch the results themselves: http://php.net/manual/en/function.odbc-fetch-array.php