1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

orm: fix last_id() call in mysql (#12173)

This commit is contained in:
nyx-litenite 2021-10-13 14:24:07 -04:00 committed by GitHub
parent 5bfa3d5530
commit 5b9553d5c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ pub fn (db Connection) delete(table string, where orm.QueryData) ? {
} }
pub fn (db Connection) last_id() orm.Primitive { pub fn (db Connection) last_id() orm.Primitive {
query := 'SELECT last_insert_rowid();' query := 'SELECT last_insert_id();'
id := db.query(query) or { id := db.query(query) or {
Result{ Result{
result: 0 result: 0