title: sqlite3.OperationalError: no such column: For update command in sqlite3 python
body: <p>I am trying to update values in my sqlite database using the below function</p>
  
  <pre><code>def updateNameById(self, id, val):
      c.execute("UPDATE {0} SET name = {1} WHERE rowid = {2}".format(table,val,id))
  </code></pre>
  
  <p>I also tried to write this function in different variations like</p>
  
  <pre><code>    c.execute("UPDATE "+table+" SET name = "+val+" WHERE rowid = "+id)
      #same error
  </code></pre>
  
  <p>I also tried</p>
  
  <pre><code>  c.execute("UPDATE ? table SET name = ? WHERE rowid = ?,(table,val,id))
    #this one gives syntax error near ?
  </code></pre>
  
  <p>when called from with code</p>
  
  <pre><code>print(obj.updateNameById(1,'Aquib'))
  </code></pre>
  
  <p>It gives 
  sqlite3.OperationalError: no such column: Aquib</p>
  
  <p>I also tried to put the id parameter as string and double single quotation stuff but all result in the same error after trying many combinations and looking up answers all over I finally posted this question</p>