You seem to have changed the queries quite substantially from your first code example. I suspect these newer queries will do nothing other than insert some rows containing strings into your database, or perhaps return an error, depending on the structure of the table.
The problem with the queries in your first code (and in the second too) is that they don’t specify which rows in the table are to be updated. If you only have one row, or if you want to update all rows, that’s fine of course.
On this line:
Where is this coming from? Do you set it in a bit of code that you didn’t post?