title: mysql - Fix error "TypeError: 'long' object is not iterable"
body: <p>The error message:</p>
  
  <pre><code>TypeError: 'long' object is not iterable
  </code></pre>
  
  <p>Code pointed out in error message:</p>
  
  <pre class="lang-py prettyprint-override"><code>def maxRowsTable():
      for row in x.execute("SELECT COUNT(temp) from sensors"): #this
          maxNumberRows=row[0]
      return maxNumberRows
  </code></pre>
  
  <p>My MySQLdb connection:</p>
  
  <pre><code>conn = MySQLdb.connect(
      host="localhost",
      user="user",
      passwd="pass",
      database="data"
  )
  x = conn.cursor()
  </code></pre>
  
  <p>thanks in advance!</p>