title: How can I use INSERT data WHERE correctly in python (MySQLdb import)?
body: <p>I am trying this code and keeps giving me errors.
  I wanted the 3rd for cicle to add the role in the same line as the name in the table, so I was thinking using the WHERE to find the name, but something in the sql code is wrong I cant find what.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>for member in soup.findAll("div", {"class": "member-info"}):
      for membername in member.findAll("div", {"class": "member-name"}):
          print(membername.text)
          mn=membername.text
          cur.execute("""INSERT INTO team (name)
          VALUES (%s)""",
          [
          (membername.text)
          ])
      for memberrole in member.findAll("div", {"class": ""}):
          print(memberrole.text)
          cur.execute("""INSERT INTO team (role)
          VALUES (%s)
          WHERE name=%s""",
          [
          (memberrole.text),
          (mn)
          ])
  db.commit()
  db.close()</code></pre>
  </div>
  </div>
  </p>