diff --git a/phpgwapi/inc/class.db_mysql.inc.php b/phpgwapi/inc/class.db_mysql.inc.php index 17d32c30ab..c9e89c9079 100644 --- a/phpgwapi/inc/class.db_mysql.inc.php +++ b/phpgwapi/inc/class.db_mysql.inc.php @@ -289,6 +289,15 @@ return True; } + function get_last_insert_id() + { + /* This will get the last insert ID created on the current connection. Should only be called + * after an insert query is run on a table that has an auto incrementing field. + */ + + return @mysql_insert_id($this->Link_ID); + } + /* public: table locking */ function lock($table, $mode='write') {