A
A
a2020-08-11 20:53:41
Python
a, 2020-08-11 20:53:41

How to get dictionary data from mysql database?

I am using mysql.connector library. Didn't find it on google. I receive data in this format: But I know that it is possible like this: I have been trying to solve this issue for a long time. Thanks in advance)
("a", "b")
{"a": "a", "b": "b"}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-08-11
@MZOK

Okay, I’ll google for you, since hands don’t grow from there https://dev.mysql.com/doc/connector-python/en/conn...
PS I seriously don’t understand how everyone googles here, just type "mysql.connector dict"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question