note 81117 deleted from function.mssql-rows-affected by danbrown

From: Date: Thu, 19 Mar 2009 15:56:39 +0000
Subject: note 81117 deleted from function.mssql-rows-affected by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-152152@lists.php.net to get a copy of this message
Note Submitter: ricalb at globo dot com ---- I had the same problem as Pierre, but I think it could be a little bit better if the code was like the one above: <?php function update($sql){ $result = mssql_query($sql,$link); if (function_exists('mssql_rows_affected')) { return mssql_rows_affected($link); } else { $result = mssql_query("select @@rowcount as rows", $link); $rows = mssql_fetch_assoc($result); return $rows['rows']; } } ?>

« previous php.notes (#152152) next »