@@ -106,7 +106,7 @@ Okay, so you want to use ``_mysql`` anyway. Here are some examples.
106106
107107The simplest possible database connection is::
108108
109- import _mysql
109+ from MySQLdb import _mysql
110110 db=_mysql.connect()
111111
112112This creates a connection to the MySQL server running on the local
@@ -162,8 +162,8 @@ substitution, so you have to pass a complete query string to
162162 WHERE price < 5""")
163163
164164There's no return value from this, but exceptions can be raised. The
165- exceptions are defined in a separate module, ``_mysql_exceptions ``,
166- but ``_mysql `` exports them. Read DB API specification PEP-249 _ to
165+ exceptions are defined in a separate module, ``MySQLdb._exceptions ``,
166+ but ``MySQLdb. _mysql `` exports them. Read DB API specification PEP-249 _ to
167167find out what they are, or you can use the catch-all ``MySQLError ``.
168168
169169.. _PEP-249 : https://www.python.org/dev/peps/pep-0249/
@@ -213,7 +213,7 @@ implicitly asked for one row, since we didn't specify ``maxrows``.
213213The other oddity is: Assuming these are numeric columns, why are they
214214returned as strings? Because MySQL returns all data as strings and
215215expects you to convert it yourself. This would be a real pain in the
216- ass, but in fact, ``_mysql `` can do this for you. (And ``MySQLdb ``
216+ ass, but in fact, ``MySQLdb. _mysql `` can do this for you. (And ``MySQLdb ``
217217does do this for you.) To have automatic type conversion done, you
218218need to create a type converter dictionary, and pass this to
219219``connect() `` as the ``conv `` keyword parameter.
0 commit comments