note 71783 rejected from function.mssql-num-rows by danbrown

From: Date: Sun, 21 Dec 2008 02:23:27 +0000
Subject: note 71783 rejected from function.mssql-num-rows by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148400@lists.php.net to get a copy of this message
Note Submitter: jose_dandrade at yahoo dot com ---- When connecting to MS SQL, I think it is not right to try mssql_num_rows() or mssql_free_result() on a DELETE Query. Because there is nothing to return. $db = mssql_connect('server','user','password') or die('No Connection'); mssql_select_db('database',$db); $rs2 = mssql_query('DELETE from table',$db); $p = mssql_num_rows($rs2); mssql_free_result($rs2); You might receive a warning like: Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource

« previous php.notes (#148400) next »