Fixed affected_rows() function, added PDO/postgres note for insert_id() function
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index b0bd707..d6af974 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -173,12 +173,16 @@
 	 *
 	 * @access	private called by the base class
 	 * @param	string	an SQL query
-	 * @return	resource
+	 * @return	object
 	 */
 	function _execute($sql)
 	{
 		$sql = $this->_prep_query($sql);
-		return $this->conn_id->query($sql);
+		$result_id = $this->conn_id->query($sql);
+		
+		$this->affect_rows = $result_id->rowCount();
+		
+		return $result_id;
 	}
 
 	// --------------------------------------------------------------------
@@ -322,11 +326,7 @@
 	 */
 	function affected_rows()
 	{
-		if ($this->db_debug)
-		{
-			return $this->display_error('db_unsuported_feature');
-		}
-		return FALSE;
+		return $this->affect_rows;
 	}
 
 	// --------------------------------------------------------------------
@@ -337,9 +337,9 @@
 	 * @access	public
 	 * @return	integer
 	 */
-	function insert_id()
+	function insert_id($name=NULL)
 	{
-		return $this->conn_id->lastInsertId();
+		return $this->conn_id->lastInsertId($name);
 	}
 
 	// --------------------------------------------------------------------
diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html
index 6a8aba5..ecd0d84 100644
--- a/user_guide/database/helpers.html
+++ b/user_guide/database/helpers.html
@@ -64,6 +64,7 @@
 
 <h2>$this->db->insert_id()</h2>
 <p>The insert ID number when performing database inserts.</p>
+<p class="important"><strong>Note:</strong> If using the PDO driver with PostgreSQL, this function requires a $name parameter, which specifies the appropriate sequence to check for the insert id.</p>
 
 <h2>$this->db->affected_rows()</h2>
 <p>Displays the number of affected rows, when doing "write" type queries (insert, update, etc.).</p>