I'm getting an error which I can't see any fix on the internet. I am new to go-lang and I can't see any error in my SQL statement. I am executing an update query in go-lang. the code is:
sql = "UPDATE tablename SET id1='' WHERE id2=" +fmt.Sprint(v.acctId)
_, err = db.Exec(sql, nil)
id1 and id2 are both varchar. I put the SQL statement in a string then execute it. I tried removing one of the ids but it still keeps showing the error. Also what I noticed is that the value of v.acctId isn't always the same for some reason. I don't know why this happens because when I tried the SQL statement on MySQL workspace, it works fine.