Documentation Home
MySQL Connector/Python Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 0.6Mb
PDF (A4) - 0.6Mb
HTML Download (TGZ) - 83.7Kb
HTML Download (Zip) - 99.4Kb


MySQL Connector/Python Developer Guide  /  Connector/Python C Extension API Reference  /  _mysql_connector.MySQL.fetch_fields() Method

11.15 _mysql_connector.MySQL.fetch_fields() Method

Syntax:

field_info = ccnx.fetch_fields()

Fetches column information for the active result set. Returns a list of tuples, one tuple per column

Raises a MySQLInterfaceError exception for any MySQL error returned by the MySQL server.

ccnx.query('SELECT CURRENT_USER(), 1 + 3, NOW()')
field_info = ccnx.fetch_fields()
for fi in field_info:
  print(fi)
ccnx.consume_result()

User Comments
Sign Up Login You must be logged in to post a comment.