Search Results
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlcursor-fetchall.html
Syntax: rows = cursor.fetchall() The method fetches all (or all remaining) rows of a query result set and returns a list of tuples. If no more rows are available, it returns an empty list.
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlcursor-fetchwarnings.html
Syntax: tuples = cursor.fetchwarnings() This method returns a list of tuples containing warnings generated by the previously executed operation. The following example shows a SELECT statement that generates a warning: >>> cnx.get_warnings = True >>> ...To set whether to fetch warnings, use the connection's get_warnings ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlcursor-nextset.html
Syntax: row = cursor.nextset() This method makes the cursor skip to the next available set, discarding any remaining rows from the current set. It returns None if there are no more sets or returns True and subsequent calls to the cursor.fetch*() ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlcursor-stored-results.html
Syntax: iterator = cursor.stored_results() This method returns a list iterator object that can be used to process result sets produced by a stored procedure executed using the callproc() method. The result sets remain available until you use the ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlcursor-warnings.html
Syntax: tuples = cursor.warnings This property returns a list of tuples containing warnings generated by the previously executed operation. The following example shows a SELECT statement that generates a warning: >>> cnx.get_warnings = True >>> ...
https://dev.mysql.com/doc/connectors/en/connector-python-api-mysqlcursor-with-rows.html
Syntax: boolean = cursor.with_rows This read-only property returns True or False to indicate whether the most recently executed operation could have produced rows. The with_rows property is useful when it is necessary to determine whether a ...
https://dev.mysql.com/doc/connectors/en/connector-python-example-connecting.html
The connect() constructor creates a connection to the MySQL server and returns a MySQLConnection object. The following example shows how to connect to the MySQL server: import mysql.connector cnx = mysql.connector.connect(user='scott', ...
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlconnection-get-warnings.html
>>> cnx.get_warnings = True >>> cursor.execute('SELECT "a"+1') >>> cursor.fetchall() [(1.0,)] >>> cursor.fetchwarnings() [(u'Warning', 1292, u"Truncated incorrect DOUBLE value: 'a'")] Returns True or False. This property can be assigned a value of ...
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-close.html
Syntax: cursor.close() Use close() when you are done using a cursor. This method closes the cursor, resets all results, and ensures that the cursor object has no reference to its original connection object.
https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-description.html
Syntax: tuples = cursor.description This read-only property returns a list of tuples describing the columns in a result set. Each tuple in the list contains values as follows: (column_name, type, None, None, None, None, null_ok, column_flags) The ...