title: python mysql connector - What is the right way for multiple queries
body: <pre><code>import mysql.connector
  cnx=mysql.connector.connect(user,password,host,database)
  cursor=(cnx.cursor)
  </code></pre>
  
  <p>and, i am trying to query the database twice with different queries as below</p>
  
  <pre><code>query1result=[]
  query2result=[]
  
  cursor.execute(query1)
  for each in cursor:
      query1result.append[each]
  cursor.execute(query1)
  for each in cursor:
      query1result.append[each]
  </code></pre>
  
  <p>I get an error at python/mysql/connector/cursor.py. line 474</p>
  
  <p>I want to know what is the right way for multiple queries. </p>