php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26590 mssql_num_rows()
Submitted: 2003-12-11 00:04 UTC Modified: 2003-12-11 06:33 UTC
From: bhavin dot shah at cgi dot com Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4.3.4 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bhavin dot shah at cgi dot com
New email:
PHP Version: OS:

 

 [2003-12-11 00:04 UTC] bhavin dot shah at cgi dot com
Description:
------------
As per the documentation, mssql_num_rows() returns the number of rows in a result set. It works fine, if stored procedure returns some records. But it gives following error when stored procedure returns nothing (empty recordset). 

mssql_num_rows(): supplied argument is not a valid MS SQL-result resource

mssql_num_rows() should return 0, when no records are returned from stored procedure.


It seems that the problem is with mssql_execute(). It does not return any Resource ID, if the result is empty. Hence, mysql_num_rows() fails which expects Resource ID as the parameter.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-11 06:33 UTC] sniper@php.net
You need to check that passed parameters are valid.
No bug here.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 13:01:30 2024 UTC