From 5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 17 Oct 2015 22:11:44 +0100 Subject: Add support for getting last insert value --- libmysqlpp/connection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libmysqlpp/connection.cpp') diff --git a/libmysqlpp/connection.cpp b/libmysqlpp/connection.cpp index d3457f5..fe3f51f 100644 --- a/libmysqlpp/connection.cpp +++ b/libmysqlpp/connection.cpp @@ -261,3 +261,9 @@ MySQL::Connection::bulkUploadData(const char * data, size_t len) const return len; } +int64_t +MySQL::Connection::insertId() const +{ + return mysql_insert_id(&conn); +} + -- cgit v1.2.3