php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27764 Stored Procedure with no result sets doesn't set output params
Submitted: 2004-03-29 17:30 UTC Modified: 2004-03-30 12:50 UTC
From: Jeff dot Leigh at Premconf dot com Assigned: fmk (profile)
Status: Closed Package: MSSQL related
PHP Version: 4.3.5 OS: Windows 2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Jeff dot Leigh at Premconf dot com
New email:
PHP Version: OS:

 

 [2004-03-29 17:30 UTC] Jeff dot Leigh at Premconf dot com
Description:
------------
Create an MSSQL stored procedure that does not return any result sets.  It only takes input parameters, and returns parameters.

Create php code to called stored procedure, bind, etc, etc.  

Execute the procedure.  You will not get any bug reported, and the output param variables will not be changed.  mssql_execute will not return anything, since there are no result sets.  Thus, 'mssql_next_result' cannot be called.

If I force the stored procedure to return at least one result set, the output parameter is set properly.

(There is nothing wrong with my MSSQL configuration from what I can tell.  I can connect and do standard queries just fine.) 

Oh, and the current documentation says there is an optional second parameter for mssql_execute()... a boolean.  If I try to use it, I get an error regarding an incorrect number of arguments to mssql_execute().  I'm assuming this was depreciated, but not documented.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-30 12:50 UTC] fmk@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

The second parameter to mssql_execute() can be used to skip any result sets returned by the stored procedure. I've tested thsi with both php4 and php5 and the parameter works fine, and can even be used as a workarround for this bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 04:01:29 2024 UTC