Posted by Steve on 11/17/05 11:34
> I'm trying to execute a SQL stored procedure from PHP like so:
> $sql = "exec ('usp_Locations_Sel 5065')";
> However, any procedure that returns a result set doesn't make it back
> to PHP.
Not sure what you mean by "doesn't make it back". Do you get a PHP
error or is your $result empty or something else?
One possibility is that your stored proc is trying to return more than
one resultset - usually because it is returning the number of rows
affected as a second resultset. The PHP API doesn't handle this. To
stop it, in the stored proc add this line before the start of your
code:
SET NOCOUNT ON
---
Steve
Navigation:
[Reply to this message]
|