MySQL Forums
Forum List  »  Connector/Python

Re: MySQLConnection.cmd_query(statement) Example
Posted by: Geert Vanderkelen
Date: March 26, 2014 10:02AM

Hi Ernest,

The MySQLConnection.cmd_query() is more-or-less an internal method (although nothing is really internal in Python..). cmd_query() accepts just an SQL statement, nothing more.

It would be use like this:

cnx = mysql.connector.connect(..)
info = cnx.cmd_query("SELECT * FROM t1")
for row in cnx.get_rows()[0]:

Geert Vanderkelen
Software Developer at Oracle

Options: ReplyQuote

Written By
Re: MySQLConnection.cmd_query(statement) Example
March 26, 2014 10:02AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.