From: chrisj
Date: Thu May 17 03:20:07 2001
Modified files:
php-lib-stable/php/db_mssql.inc
Log message:
affected_rows() function tries to call non-existent PHP function
mssql_affected_rows(). Add code to approximate the desired behavior.
Index: php-lib-stable/php/db_mssql.inc
diff -u php-lib-stable/php/db_mssql.inc:1.2 php-lib-stable/php/db_mssql.inc:1.3
--- php-lib-stable/php/db_mssql.inc:1.2 Sun Jul 2 00:13:21 2000
+++ php-lib-stable/php/db_mssql.inc Thu May 17 03:19:37 2001
@@ -6,7 +6,7 @@
* Modified by Guarneri carmelo ([EMAIL PROTECTED])
* Modified by Cameron Just ([EMAIL PROTECTED])
*
- * $Id: db_mssql.inc,v 1.2 2000/07/01 22:13:21 kir Exp $
+ * $Id: db_mssql.inc,v 1.3 2001/05/17 01:19:37 chrisj Exp $
*/
# echo "<BR>This is using the MSSQL class<BR>";
@@ -123,7 +123,12 @@
}
function affected_rows() {
- return mssql_affected_rows($this->Query_ID);
+// Not a supported function in PHP3/4. Chris Johnson, 16May2001.
+// return mssql_affected_rows($this->Query_ID);
+ $rsRows = mssql_query("Select @@rowcount as rows", $this->Link_ID);
+ if ($rsRows) {
+ return mssql_result($rsRows, 0, "rows");
+ }
}
function num_rows() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]