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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Mar 12 11:01:32 2025 UTC