[Tutor] Dictionary within a dictionary

qsqgeekyogdty at tiscali.co.uk qsqgeekyogdty at tiscali.co.uk
Thu Jun 12 13:56:41 CEST 2008

I would like to understand how to generate dictionaries based on other 
dictionaries. For example, I have a 3 tables in ym SQL database - 
Groups, Categories and Sub-categories with a one-to-many relations 
between each.

I am presuming that each of these tables is one of my dictionaries?!?! 
What I don't understand is how to write this SQL statement in python 

SELECT id, category from Categories WHERE group_id = "1";

Can some one help me understand how to pass the group_id in a simple 
example, so that I can return all the categories from Category table.

I am using the SQL example to figure it out in my head - perhaps this 
is a wrong way to look at this?




New Online ID Theft Protection - http://www.tiscali.co.uk/spyguard

More information about the Tutor mailing list