title: Python cursor.fetchall() returns empty tuple
body: <p>I'm learning python and hit a roadblock working on a web application.
  I'm trying to fetch data from a local database (mariadb), and when I try to print out the results, all I see is <code>()</code>.</p>
  
  <p><strong>This function gets data from the DB:</strong></p>
  
  <pre><code>def getHikeInfo(name):
  
      conn, cursor = getConnectionAndCursor()
  
      cursor.execute("SELECT * FROM hiking WHERE name = %s", [name])
  
      # fetch the results
      data = cursor.fetchall()
  
      # clean up
      cursor.close()
      conn.close()
  
      return data
  </code></pre>
  
  <p><strong>This code calls the function:</strong></p>
  
  <pre><code>if 'name' in form:
      #unpack into python variable
      name=form['name'].value
      print name #debug purpose to check name is proper
      data = getHikeInfo(name)
      print data #prints '()'
  
  else:
      data = getAllHikes()
      showAllHikes(data)
  </code></pre>
  
  <p>I've tried a bunch of things from changing the way I concatenate the name to passing the name as a parameter and nothing seems to work.
  The name is 100% definitely included in the table. I can't seem to see what the problem might be.</p>
  
  <p>Any help is appreciated.</p>