title: How do I use num_rows() function in the MySQLDB API for Python?
body: <p>I have this statement</p>
  
  <pre><code>cursor = connection.cursor()
  query = "SELECT * from table"
  cursor.execute(query)
  res = cursor.fetchall()
  </code></pre>