title: How to tell if a value exists in a sqlite3 database, python
body: <p>How to tell if a value exists in a sqlite3 database, python</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>def signup():
      email = request.form['email']
      username = request.form['user']
      password = request.form['password']
      g.db.execute("INSERT INTO users VALUES (?, ?, ?)", [email, username, password])
      g.db.commit()
  </code></pre>
  
  <p>I would like it to only insert the values into the database if <code>email</code> and <code>username</code> aren't in the database, but I have no idea where to start. </p>