title: SQLite3 and Python 3 - "no such column" error with strings but not integers
body: <p>For this project, I have a database file with a table RESULTS which looks like this:</p>
  
  <pre><code>conn.execute('''CREATE TABLE RESULTS(
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  name TEXT NOT NULL,
  age TEXT NOT NULL,
  gender TEXT NOT NULL);''')
  </code></pre>
  
  <p>And this is the file I'm using to create a prototype front end so that users can access the data in the database:</p>
  
  <pre><code>#setting up the user input variables
  srcIn = input("what field do you want to search: id, name, age, or gender? ")
  srcQuery = input("what result do you want to find from the "+ srcIn + " search? ")
  if(srcIn == "age") or (srcIn == "id"):
      #by default input returns a string but it needs to be an int for age and id parameters
      srcQuery = int(srcQuery)
      print("converted to int")
  srcOut = input("what field do you want to return: id, name, age, or gender? ")
  
  print("making cursor")
  cursor = conn.execute("SELECT %s FROM RESULTS WHERE %s = %s" % (srcOut, srcIn, srcQuery))
  for row in cursor:
      print(srcOut + ": " + row[0])
  
  conn.close()
  print("closed database " + db)
  </code></pre>
  
  <p>If I were to run this and pass it age or id, the number 45, and name it would return the names, genders, and other stats from my database perfectly. However, when I pass it gender, and female or male, and returning the names or ages or ids, an error would pop up saying this:</p>
  
  <pre><code>cursor = conn.execute("SELECT %s FROM RESULTS WHERE %s = %s" % (srcOut, srcIn, srcQuery))
  sqlite3.OperationalError: no such column: male
  </code></pre>
  
  <p>For this specific example:</p>
  
  <pre><code>srcOut = name
  srcIn = gender
  srcQuery = male
  </code></pre>
  
  <p>I've tried replacing the %s with ? arguments (I know it won't work on the parameters that I'm passing to the SELECT statement), so I'm stumped.</p>
  
  <p>I think that it has something to do with the fact that in certain instances I'm passing it an integer in the srcQuery field and in others I'm passing it a string.</p>
  
  <p>Any help or suggestions would be appreciated.</p>