DBAL: readded sql_affectedrows(), some plugins were using it
authorDan
Wed, 06 Jan 2010 02:03:10 -0500
changeset 1207 044b0062e3bf
parent 1206 50f6c144ec68
child 1208 438f36013432
DBAL: readded sql_affectedrows(), some plugins were using it
includes/dbal.php
--- a/includes/dbal.php	Wed Jan 06 02:02:51 2010 -0500
+++ b/includes/dbal.php	Wed Jan 06 02:03:10 2010 -0500
@@ -521,6 +521,16 @@
   }
   
   /**
+   * Returns the number of rows affected.
+   * @return int
+   */
+  
+  function sql_affectedrows()
+  {
+    return mysql_affected_rows($this->_conn);
+  }
+  
+  /**
    * Close the database connection
    */
   
@@ -1160,6 +1170,16 @@
 			return ( defined('IN_ENANO_INSTALL') ) ? $GLOBALS["lang"]->get('dbpgsql_msg_err_auth') : 'Access to the database was denied. Ensure that your database exists and that your username and password are correct.';
 		}
 	}
+	
+	/**
+   * Returns the number of rows affected.
+   * @return int
+   */
+  
+  function sql_affectedrows()
+  {
+    return pg_affected_rows($this->latest_result);
+  }
 
   /**
    * Generates and outputs a report of all the SQL queries made during execution. Should only be called after everything's over with.