bugfix insert lastid in mysql
This commit is contained in:
1 parent
7a4c6eb35d
commit
4a6840fd2f
1 file changed
+1
-1
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user