when exec multi result query as the example, the first result is correct, and the res.MoreResults() shows true, but res.NextResult() returns the nex result has nil data
here is my code:
func main() {
fmt.Println("My First MySQL Application")
db := mysql.New("tcp", "", "127.0.0.1:3306", "root", "root", "reckoning")
err := db.Connect()
if err != nil {
panic(err)
}
sql := "SELECT * from reckoning.reckoning_bits WHERE id = 10000; SELECT * FROM reckoning.inventory_bits where instance_id = 10080;"
res, _ := db.Start(sql)
row, _ := res.GetRow()
fmt.Printf("id is %v \n", row.Str(0))
res, _ = res.NextResult()
if res == nil {
fmt.Println("Hmm, there is no result. Why?!")
}
row, _ = res.GetRow()
fmt.Printf("instance_id is %v \n", row.Int(0))
}
when exec multi result query as the example, the first result is correct, and the res.MoreResults() shows true, but res.NextResult() returns the nex result has nil data here is my code: