#26590 [Opn->Bgs]: mssql_num_rows()

From: Date: Thu, 11 Dec 2003 11:33:48 +0000
Subject: #26590 [Opn->Bgs]: mssql_num_rows()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-51948@lists.php.net to get a copy of this message
 ID:               26590
 Updated by:       sniper@php.net
 Reported By:      bhavin dot shah at cgi dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: Windows
 PHP Version:      4.3.4
 New Comment:

You need to check that passed parameters are valid.
No bug here.



Previous Comments:
------------------------------------------------------------------------

[2003-12-11 00:04:54] 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.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26590&edit=1


Thread (2 messages)

« previous php.bugs (#51948) next »