티스토리 뷰

728x90
import pymysql
connection = pymysql.connect(db="test")
cursor = connection.cursor(pymysql.cursors.DictCursor)
cursor.execute("SELECT ...")

https://stackoverflow.com/questions/4940670/pymysql-fetchall-results-as-dictionary

 

pymysql fetchall() results as dictionary?

Is there any way to get the results from a fetchall() as a dictionary using pymysql?

stackoverflow.com

 

728x90
댓글