summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Warren <tim@timshomepage.net>2012-02-16 00:40:39 +0100
committerTimothy Warren <tim@timshomepage.net>2012-02-16 00:40:39 +0100
commit6e821cecf8ace0e7d721dd946568664c840434aa (patch)
treed8be6cf8b48ff03045b25e9e990f26ce07f47712
parenteb6dcf058bd0cc6e5f3b6a793491d4a1c144155b (diff)
Implemented insert_id() method
-rw-r--r--system/database/drivers/interbase/interbase_driver.php7
-rw-r--r--user_guide_src/source/database/helpers.rst6
2 files changed, 7 insertions, 6 deletions
diff --git a/system/database/drivers/interbase/interbase_driver.php b/system/database/drivers/interbase/interbase_driver.php
index 8a156af53..97bf722db 100644
--- a/system/database/drivers/interbase/interbase_driver.php
+++ b/system/database/drivers/interbase/interbase_driver.php
@@ -341,12 +341,13 @@ class CI_DB_interbase_driver extends CI_DB {
* Insert ID
*
* @access public
+ * @param string $generator_name
+ * @param integer $inc_by
* @return integer
*/
- public function insert_id()
+ public function insert_id($generator_name, $inc_by=1)
{
- //@todo Implement manually
- return 0;
+ return ibase_gen_id($generator_name, $inc_by);
}
// --------------------------------------------------------------------
diff --git a/user_guide_src/source/database/helpers.rst b/user_guide_src/source/database/helpers.rst
index 7ea19e9f6..e8a5ac801 100644
--- a/user_guide_src/source/database/helpers.rst
+++ b/user_guide_src/source/database/helpers.rst
@@ -7,9 +7,9 @@ $this->db->insert_id()
The insert ID number when performing database inserts.
-.. note:: If using the PDO driver with PostgreSQL, this function requires
- a $name parameter, which specifies the appropriate sequence to check
- for the insert id.
+.. 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()
===========================