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

pull/12179/head
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
1 changed files with 1 additions and 1 deletions

View File

@ -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