Information From Executing a Query
$this->db->insert_id()
The insert ID number when performing database inserts.
Note If using the PDO driver with PostgreSQL, or using the Interbase driver, this function requires a $name parameter, which specifies the appropriate sequence to check for the insert id.
$this->db->affected_rows()
Displays the number of affected rows, when doing “write” type queries (insert, update, etc.).
Note In MySQL “DELETE FROM TABLE” returns 0 affected rows. The