diff --git a/src/mysql/dbmysql.go b/src/mysql/dbmysql.go index 39b8772..4745d97 100644 --- a/src/mysql/dbmysql.go +++ b/src/mysql/dbmysql.go @@ -86,13 +86,13 @@ func TestClearData(uid int) (int,error) { func DoAddGold(uuid,gold,love int) error { for i:=0;i<10;i++ { tablename := "b_base_data_0" + strconv.Itoa(i) - cmd := "update " + tablename + "set coin = " + strconv.Itoa(gold) + " where user_id= " + strconv.Itoa(uuid) + cmd := "update " + tablename + " set coin = " + strconv.Itoa(gold) + " where user_id= " + strconv.Itoa(uuid) err := ExcuteCmd(cmd) if err != nil { logger.Error("DoAddGold err=%v,cmd=%v",err,cmd) return err } - cmd = "update " + tablename + "set love_exp = " + strconv.Itoa(love) + " where user_id= " + strconv.Itoa(uuid) + cmd = "update " + tablename + " set love_exp = " + strconv.Itoa(love) + " where user_id= " + strconv.Itoa(uuid) err = ExcuteCmd(cmd) if err != nil { logger.Error("DoAddGold err=%v,cmd=%v",err,cmd) -- libgit2 0.21.0