title: Why would MySQL execute return None?
body: <p>I am trying to query on a local MySQL database using Python's (3.4) MySQL module with the following code:</p>
  
  <pre><code>class databases():
  
    def externaldatabase(self):
  
    try:
      c = mysql.connector.connect(host="127.0.0.1", user="user",
                                  password="password", database="database")
       if c.is_connected():
             c.autocommit = True
        return(c)
      except:
           return(None)
      d = databases().externaldatabase()
      c = d.cursor() 
      r = c.execute('''select * from tbl_wiki''')
      print(r) 
  &gt; Returns: None
  </code></pre>
  
  <p>As far as I can tell, the connection is successful, the database is composed of several rows but the query always returns the none type.</p>
  
  <p>What instances does the MySQL execute function return None?</p>