From: bhavin dot shah at cgi dot com Operating system: Windows PHP version: 4.3.4 PHP Bug Type: MSSQL related Bug description: mssql_num_rows()
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 bug report at http://bugs.php.net/?id=26590&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26590&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26590&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26590&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26590&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26590&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26590&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26590&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26590&r=support Expected behavior: http://bugs.php.net/fix.php?id=26590&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26590&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26590&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26590&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26590&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26590&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26590&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26590&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26590&r=float