Hello
var sql string="INSERT INTO page (title,text) VALUES(?,?)"
var stmt,err = DB.Prepare(sql)
now can execute with : res,err := stmt.Exec("reckhou", "IT")
but i need a way to can set values as a array :
values=[]string{"reckhou", "IT"}
res,err := stmt.Exec(values)
please help me!
It must be an interface slice and you have to add ...
Try
values = []interface{"reckhou", "IT"}
res,err := stmt.Exec(values...)
Most helpful comment
It must be an interface slice and you have to add
...Try