diff --git a/vlib/mysql/orm.v b/vlib/mysql/orm.v index 3a19a16092..5f999c3b49 100644 --- a/vlib/mysql/orm.v +++ b/vlib/mysql/orm.v @@ -105,7 +105,7 @@ pub fn (db Connection) delete(table string, where orm.QueryData) ? { } pub fn (db Connection) last_id() orm.Primitive { - query := 'SELECT last_insert_rowid();' + query := 'SELECT last_insert_id();' id := db.query(query) or { Result{ result: 0