title: MySQL and Python execution() only takes 3 arguments, 4 given
body: <p>I've searched around but it looks like most people with a similar question have two strings on one SQL variable, whereas I have two different arguments.</p>
  
  <p>My code:</p>
  
  <pre><code>xpcounter = ("UPDATE CharactersDB SET Exp=%s WHERE %s", xp, name) #where is name variable
  cur.execute(*xpcounter)
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>xpcounter = ("UPDATE CharactersDB SET Exp=%s WHERE %s") #where is name variable
  cur.execute(xpcounter, xp, name)
  </code></pre>
  
  <p>both times I get a </p>
  
  <pre><code>TypeError: execute() takes at most 3 arguments (4 given)
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: As per monoid's suggestion, my code now looks like:</p>
  
  <p>xpcounter = ("UPDATE CharactersDB SET Exp=%s WHERE %s", (xp, name,))
  cur.execute(*xpcounter)</p>
  
  <p>Now I get a </p>
  
  <p>Truncated incorrect INTEGER value: 'testname'</p>
  
  <p>when I run it.</p>
  
  <p>EDIT: Turns out my database is updating correctly, just a warning, not an error.</p>