bugfix insert lastid in mysql

This commit is contained in:
ycc 2023-07-05 14:18:44 +02:00
parent 7a4c6eb35d
commit 4a6840fd2f

2
db.go
View File

@ -484,7 +484,7 @@ func (t *TableInfo) Insert(record AssRow) (int, error) {
if err != nil {
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
}