Let's say I have a table with the following format:
| favoritefood | favoritedrink |
|---|---|
| pizza | water |
| ice cream | orange juice |
| pizza | milk |
How would I return both rows with pizza as the favorite food with Python?
I have fetchrow implemented for other functions, but it only works for one row, of course.
Ideally, they would be sorted into dictionaries (ex: {favoritefood: pizza, favoritedrink: water)