diff --git a/transaction.go b/transaction.go index 00d2e0a..cde5fa8 100755 --- a/transaction.go +++ b/transaction.go @@ -122,7 +122,7 @@ func TxUpdate(tx *sql.Tx, dbname, table string, data map[string]string, where ma if strings.Contains(table, "select ") { dbName = table } else { - dbName = getTableName(dbName, table) + dbName = getTableName(dbname, table) } if len(data) < 1 { return rowsAffected, errors.New("参数错误,没有要写入的数据")