Literal escaping is recommended by the docs:
Note that any literal percent signs in the query string passed to
execute()
must be escaped, i.e.%%
.
More Related Contents:
- MySQL parameterized queries
- PyInstaller, spec file, ImportError: No module named ‘blah’
- How to insert pandas dataframe via mysqldb into database?
- Load CSV data into MySQL in Python
- Enable Python to Connect to MySQL via SSH Tunnelling
- UnicodeEncodeError: ‘latin-1’ codec can’t encode character
- How can I insert data into a MySQL database?
- How to replace Django’s primary key with a different integer that is unique for that table
- Writing to MySQL database with pandas using SQLAlchemy, to_sql
- MySQL “incorrect string value” error when save unicode string in Django
- How to use MySQLdb with Python and Django in OSX 10.6?
- How to enable MySQL client auto re-connect with MySQLdb?
- Django : Table doesn’t exist
- Error loading MySQLdb Module ‘Did you install mysqlclient or MySQL-python?’
- Python MYSQL update statement
- Python Mysql, “commands out of sync; you can’t run this command now”
- MySQL: Get column name or alias from query
- Python Pandas write to sql with NaN values
- Python: MySQLdb and “Library not loaded: libmysqlclient.16.dylib”
- How to filter (or replace) unicode characters that would take more than 3 bytes in UTF-8?
- trapping a MySql warning
- Python: use mysqldb to import a MySQL table as a dictionary?
- ImportError: No module named ‘MySQL’
- InterfaceError (0, ”)
- What’s the difference between MySQLdb, mysqlclient and MySQL connector/Python?
- Simple Subquery with OuterRef
- Remove duplicates in list of object with Python
- pip install mysqlclient : Microsoft Visual C++ 14.0 is required
- Installing mysql-python on Centos
- Context manager for Python’s MySQLdb