From 3edaa27532af8d67e5725e2b5b6a2e62ce9e6d8b Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Sun, 2 Dec 2007 00:11:55 +0100 Subject: [PATCH] [svn r13884] Added method insert_id() --- main/inc/lib/database.lib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/inc/lib/database.lib.php b/main/inc/lib/database.lib.php index 6d2a7203b7..610c26a093 100644 --- a/main/inc/lib/database.lib.php +++ b/main/inc/lib/database.lib.php @@ -683,6 +683,14 @@ class Database return mysql_result($resource,$row); } } + /** + * Recovers the last ID of any insert query executed over this SQL connection + * @return integer Unique ID of the latest inserted row + */ + function insert_id() + { + return mysql_insert_id(); + } } //end class Database ?> \ No newline at end of file