Answer the question
In order to leave comments, you need to log in
How to pass long text in query to MySQL from python?
I need to store the text along with hyphens, but the mysql library for python requires sending the request as a string, in which the correct transfer of hyphens cannot be arranged.
I write a query like:
query = "INSERT INTO table (id, name, text) " +
"VALUES (" + str(id) + ", \'" + name + "\', \'" + text + "\') "
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question