Documentation Home
Connectors and APIs Manual
Download this Manual MySQLConnection.get_rows() Method



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 is None, all rows are retrieved.

The tuple returned by get_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_flag and warning_count.

An InterfaceError is raised when all rows have been retrieved.

MySQLCursor uses the get_rows() method to fetch rows.

Returns a tuple.

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.