mssql_rows_affected

(PHP 4 >= 4.0.4, PHP 5)

mssql_rows_affected --  Returns the number of records affected by the query

Description

int mssql_rows_affected ( resource conn_id )

警告

本函数暂无文档,仅有参数列表。


add a note add a note User Contributed Notes
paul dot bulmer at e-businessengines dot com
30-Aug-2002 01:34
mssql_rows_affected works with PHP 4.2.1 on windows as long as you include the connection ID, without that even though it doesn't generate an error with just 'value = mssql_rows_affected' it doesn't pick up any value
blakjak at NOSPAM dot com dot au
18-Jul-2002 05:00
At the time of writing this note, the mssql_rows_affected function doesn't seem to be working.  If you need to access the number of rows affected by the most recent mssql query, you can grab the @@ROWCOUNT variable.  A quick example of how to do this:

function rows_affected(){
 $result = mssql_query("SELECT @@ROWCOUNT");
 list($affected) = mssql_fetch_row($result);
 return $affected;
}