From 5b9553d5c4de0dad22c8fed0c38736ec5de50c67 Mon Sep 17 00:00:00 2001 From: nyx-litenite <50533436+nyx-litenite@users.noreply.github.com> Date: Wed, 13 Oct 2021 14:24:07 -0400 Subject: [PATCH] orm: fix last_id() call in mysql (#12173) --- vlib/mysql/orm.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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