ODBC Stored Procedures
| From: | William Jackson | Date: | Wed, 05 Jul 2000 14:34:45 +0000 |
| Subject: | ODBC Stored Procedures | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-868@lists.php.net to get a copy of this message | ||
I have a small problem
I have a stored procedure in my SQL Server database
CREATE PROCEDURE x
@ID int,
@RetVal int OUTPUT
AS
.......
SELECT @RetVal = 1
RETURN
in my php program I want to call that stored procedure and also get hold of
the return value
so I have something like
$SQL = "{ ? = CALL x ( ? ) }";
$Values = array ($ID);
$Query_ID = odbc_prepare($Link_ID,$SQL);
$Query_OK = odbc_execute($Query_ID,&$Values);
for a stored proc that doesnt return anything this works fine but I cant
seem to work out the correct way of calling the above procedure and also
getting the @RetVal Value.
Anybody have any ideas?
thanks