orm: fix last_id() call in mysql (#12173)
parent
5bfa3d5530
commit
5b9553d5c4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue