troubleshooting Question

Calling MSSQL Stored Procedure from PHP with multiple input params, single output param

Avatar of techleet
techleet asked on
Microsoft SQL ServerPHP
6 Comments1 Solution1394 ViewsLast Modified:
Here's my code:

$rs = mssql_execute($db, "UserRegisterEx_M '$user_id', '$password', '$email', @result=1");
while( $arg = mssql_fetch_assoc($rs)) echo $arg['result'];

The stored procedure either returns "1", "-1" or "99999".  The problem is, when I call this SP in PHP, it returns "0".  I assume my PHP is wrong.  How can I call this SP and return the result?


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros