bugfix insert lastid in mysql
This commit is contained in:
parent
7a4c6eb35d
commit
4a6840fd2f
2
db.go
2
db.go
@ -484,7 +484,7 @@ func (t *TableInfo) Insert(record AssRow) (int, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return id, err
|
return id, err
|
||||||
}
|
}
|
||||||
err = t.db.conn.QueryRow("LAST_INSERT_ID();").Scan(&id)
|
err = t.db.conn.QueryRow("SELECT LAST_INSERT_ID();").Scan(&id)
|
||||||
}
|
}
|
||||||
return id, err
|
return id, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user