diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-10-17 22:11:44 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-10-20 01:40:55 +0100 |
commit | 5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0 (patch) | |
tree | 676b2a3d320412b5e4b2cb28ac20e1c22c00add6 /libmysqlpp/connection.cpp | |
parent | Add override attributes (diff) | |
download | libdbpp-mysql-5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0.tar.bz2 libdbpp-mysql-5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0.tar.xz libdbpp-mysql-5ceff5fb8d1f1c9edcd53f73fe4bcc4029fc45a0.zip |
Add support for getting last insert value
Diffstat (limited to 'libmysqlpp/connection.cpp')
-rw-r--r-- | libmysqlpp/connection.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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); +} + |