fix missing .Value in db update
This commit is contained in:
2
main.go
2
main.go
@@ -140,7 +140,7 @@ func InsertToDB(tasklist Tasklist, db *sql.DB) {
|
||||
fmt.Println("Error during insert: ", err)
|
||||
}
|
||||
} else {
|
||||
_, err := db.Exec("update tasklists set "+GetTaskNameString(" = ?,")+" = ? where name = ?", tasklist.Tasks[0].Value, tasklist.Tasks[1].Value, tasklist.Tasks[2].Value, tasklist.Tasks[3].Value, tasklist.Tasks[4].Value, tasklist.Tasks[5].Value, tasklist.Tasks[6].Value, tasklist.Tasks[7], tasklist.Title)
|
||||
_, err := db.Exec("update tasklists set "+GetTaskNameString(" = ?,")+" = ? where name = ?", tasklist.Tasks[0].Value, tasklist.Tasks[1].Value, tasklist.Tasks[2].Value, tasklist.Tasks[3].Value, tasklist.Tasks[4].Value, tasklist.Tasks[5].Value, tasklist.Tasks[6].Value, tasklist.Tasks[7].Value, tasklist.Title)
|
||||
if err != nil {
|
||||
fmt.Println("Error during update: ", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user