fetchone()

Fetches next row of a pending result set and returns a tuple.

See also: MariaDB Connector/Python 1.0

EXAMPLES

import mariadb

conn = mariadb.connect(
    host = 'localhost',
    user = 'root',
    password = 'secret',
    database = 'test',
    )

cursor = conn.cursor()

cursor.execute("SELECT * FROM sample")
while True:
    row = cursor.fetchone()
    if not row:
        break
    print(row)