title: Python Multiple Select Queries SQL
body: <p>I am trying to run two select queries one from a puzzle table and one from a table that stores the ids of the puzzles a user has played. I want the ids from the puzzles selected and then the ids for the puzzles played selected so that i can compare the two lists to find the puzzles the users has not yet played.</p>
  
  <p>I am having an issue because the first query runs correctly but the second isn't as it seems to be taking the two values from the first query. How do i stop this? Its like i need to close the connection before running the next select query.</p>
  
  <pre><code>    cur=connection.cursor()
      cur.execute("SELECT id FROM puzzles WHERE approved =? AND level=? ",(1, UserLevel))
      puzzle_rows=cur.fetchall()
      print(puzzle_rows)
  
      cur=connection.cursor()
      cur.execute("SELECT id FROM puzzle_users WHERE name =?",(username))
      played_rows=cur.fetchall()
      print(played_rows)
  
      not_played = [[x for x in puzzle_rows if x not in played_rows]]
      print(not_played)
  </code></pre>
  
  <p>The error i get is: </p>
  
  <pre><code>conn.execute("SELECT id FROM puzzle_users WHERE name =?",(username))
  sqlite3.ProgrammingError: Incorrect number of bindings supplied
  </code></pre>
  
  <p>The current statement uses 1, and there are 3 supplied.</p>