Skip to Main Content
MySQL Connector/Python Revealed: SQL and NoSQL Data Storage Using MySQL for Python Programmers
book

MySQL Connector/Python Revealed: SQL and NoSQL Data Storage Using MySQL for Python Programmers

by Jesper Wisborg Krogh
July 2018
Intermediate to advanced content levelIntermediate to advanced
527 pages
9h 59m
English
Apress
Content preview from MySQL Connector/Python Revealed: SQL and NoSQL Data Storage Using MySQL for Python Programmers
© Jesper Wisborg Krogh 2018
Jesper Wisborg KroghMySQL Connector/Python Revealedhttps://doi.org/10.1007/978-1-4842-3694-9_3

3. Basic Query Execution

Jesper Wisborg Krogh1 
(1)
Hornsby, New South Wales, Australia
 

The previous chapter discussed how to connect to MySQL from the Python program. However, there is not much point in creating a connection just to get a connection ID or do nothing. The whole point of MySQL Connector/Python, after all, is to execute queries. This chapter will look at the basics of query execution.

First, you will learn how to execute queries using the cmd_query() method of the connection object. Then you will explore the more advanced concept of cursors. Lastly, you’ll see how to handle user input.

Tip

There are a number of example ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Using MySQL Databases with Python

Using MySQL Databases with Python

John Elder
The Complete Python and PostgreSQL Developer Course

The Complete Python and PostgreSQL Developer Course

Codestars By Rob Percival, Jose Salvatierra Fuentes

Publisher Resources

ISBN: 9781484236949Purchase LinkPublisher Website