My iOS app uses SQLite3 databases and so far I have successfully managed to create tables, insert values and then later select them.
However, now I want to update. I tried this:
UPDATE field WHERE _id = 5 (name,type,state) VALUES (?,?,?)
But SQLite tells me a syntax error exists near the WHERE
As I understand that SQLite may not support the above syntax preferring it formatted as below.
UPDATE field SET name= "Upper" type= "Pigs" state=1 WHERE _id = 5;
However notice in the second statement there are no (?,?,?) (parameterized query I believe its called) for dynamically inserting values into the SQL string. Tell me is this possible and if so how?