title: Sqlite3 List index out of range when trying to get LIKE Query
body: <p>I'm trying to execute the following code:</p>
  
  <pre><code>conn = sqlite3.connect("./Databases/Functions/He.db")
  cursor = conn.cursor()
  
  sql = "SELECT * FROM Requests WHERE Request like ?"
  cursor.execute(sql, [(msg)])
  results = cursor.fetchall()[0]
  print results
  
  if((results)[1] == "True"):
      GPIO = (results)[2]
      Direction = (results)[3]
      print "GPIO Setup ready.."
  </code></pre>
  
  <p>and I'm getting the following error:</p>
  
  <pre><code>File "./Functions/doFunctions.py", line 29, in enRequests
  results = cursor.fetchall()[0]
  IndexError: list index out of range
  </code></pre>
  
  <p>I'm always messing up with database, and finally fixing those problems,
  I don't know why they pop up from the beginning..</p>
  
  <p>The code getting msg string, searching if it exist on the database, if it does then taking the GPIO pin and sending signal (request is at index <code>0</code> in the database row while the GPIO pin is at index <code>2</code>).</p>