Hey guys I am in the process of making an online store. My products
are stored in the db with basic table.

db.define_table('products',
    Field('MainCategory', 'string'),
    Field('SubCategory', 'string'),
    Field('Title', 'string'),
    Field('Price', 'double'),
    Field('image', 'upload', uploadfield='image_field'),
    Field('image_field', 'blob')
    )

Every product has a main category and a subcategory.  for the means of
a simple example lets say ANIMAL is a main category, CAT and DOG are
subcategories.

In my view I have a jQuery accordion style navigation menu that has my
MainCategory and under them their SubCategories.
I need the navigation menu to take the MainCategory and the
SubCategory and then query the DB to select only the products that
belong to those categories.  Then loop through the results placing
them in a table in a div of my page.

I have no troubles setting everything statically to achieve what I
want to do. But I would love to setup a function that i can pass
arguments to to achieve the desired results. So that the website is
easily expandable in the future.

Thank you in advance to anyone that helps me out I will be forever
greatful!

Reply via email to