note 76788 deleted from function.mssql-rows-affected by danbrown
| From: | danbrown@php.net | Date: | Fri, 29 Jan 2010 15:06:29 +0000 |
| Subject: | note 76788 deleted from function.mssql-rows-affected by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165489@lists.php.net to get a copy of this message | ||
Note Submitter: Pierre Gros
----
i don't know why, but on my linux debian with php5 I get a nice :
Fatal error: Call to undefined function mssql_rows_affected()
when I try to use this function.
So if you have some problems, try to use this :
1st function (the one with mssql_rows_affected):
<?php
function update($query){
mssql_query($query,$ressource);
return mssql_rows_affected($ressource);
}
?>
new function (the one I use now) :
<?php
function update($query){
mssql_query($query,$ressource);
$rsRows = mssql_query("select @@rowcount as rows", $ressource);
$rows = mssql_fetch_assoc($rsRows);
return $rows['rows'];
}
?>