Python Forum
Python and MYSQL Resultset - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Python and MYSQL Resultset (/thread-33129.html)



Python and MYSQL Resultset - vj78 - Mar-31-2021

Hi - I am using Python to get results from mysql database.
The results displayed shows quotes and a u concatenated to the results? Not sure why?

Result:(1, u'userone', u'password1')


RE: Python and MYSQL Resultset - kashcode - Apr-01-2021

Read this thread https://stackoverflow.com/questions/3920461/python-about-the-results-retrieved-from-mysql/3920490


RE: Python and MYSQL Resultset - vj78 - Apr-02-2021

(Apr-01-2021, 12:12 PM)kashcode Wrote: Read this thread https://stackoverflow.com/questions/3920461/python-about-the-results-retrieved-from-mysql/3920490


Thank you. It did remove the u from the result set. After adding the use_unicode=True ,charset="utf8" to the db connection string.

Now, I still have single quotes left in the result set?