note 75465 added to function.mssql-rows-affected
| From: | rowan dot collins at gmail dot com | Date: | Thu, 31 May 2007 15:42:17 +0000 |
| Subject: | note 75465 added to function.mssql-rows-affected | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127082@lists.php.net to get a copy of this message | ||
Note that, as the page says, this function expects an MSSQL *Link* resource, not a *result*
resource. This is a bit counter-intuitive, and differs from, for instance, pg_affected_rows (though
not, apparently, mysql_affected_rows).
<?php
$link = mssql_pconnect($db_host,$db_user,$db_pass);
mssql_select_db($db_name, $link);
$result = mssql_query('Select 1', $link);
$rows = mssql_rows_affected($result); # ERROR!
$rows = mssql_rows_affected($link); # Correct
?>
----
Server IP: 194.145.210.3
Probable Submitter: 217.154.203.18
----
Manual Page -- http://www.php.net/manual/en/function.mssql-rows-affected.php
Edit -- https://master.php.net/note/edit/75465
Del: integrated -- https://master.php.net/note/delete/75465/integrated
Del: useless -- https://master.php.net/note/delete/75465/useless
Del: bad code -- https://master.php.net/note/delete/75465/bad+code
Del: spam -- https://master.php.net/note/delete/75465/spam
Del: non-english -- https://master.php.net/note/delete/75465/non-english
Del: in docs -- https://master.php.net/note/delete/75465/in+docs
Del: other reasons-- https://master.php.net/note/delete/75465
Reject -- https://master.php.net/note/reject/75465
Search -- https://master.php.net/manage/user-notes.php