MySQL Connector/Python Developer Guide / ... / Connector/Python API Reference / connection.MySQLConnection Class / MySQLConnection.get_rows() Method
Syntax:
cnx.get_rows(count=None) This method retrieves all or remaining rows of a query result set, returning a tuple containing the rows as sequences and the EOF packet information. The count argument can be used to obtain a given number of rows. If count is not specified or isNone, all rows are retrieved.
The tuple returned byget_rows() consists of:
A list of tuples containing the row data as byte objects, or an empty list when no rows are available.
EOF packet information as a dictionary containing
status_flagandwarning_count.
AnInterfaceError is raised when all rows have been retrieved.
MySQLCursor uses theget_rows() method to fetch rows.
Returns a tuple.