/** * gets last value of autoincrement * @param string $table The optional table name (will replace *PREFIX*) and add sequence suffix * @return string id * @throws DatabaseException * * \Doctrine\DBAL\Connection lastInsertId * * Call this method right after the insert command or other functions may * cause trouble! */ public static function insertid($table = null) { self::connect(); return self::$connection->lastInsertId($table); }