Using Python, I've had success with selecting and updating values by row using mysql.connector with variables in my queries and defining variables (strings and integers) from query results.
I'd like to select all values from two columns in a SQL table and pass them to a dictionary, with one column holding the keys and the other column holding the values paired by table row.
I attempted this. It failed:
cursor.execute('SELECT id, name FROM colors')
for (id, name) in cursor:
test001 = dict([id, name])