PDA

View Full Version : Data Coming From Single Table


mark305140
10-01-2010, 01:12 PM
I am using Ecommerce Templates PHP software which uses a MySQL database. My problem is that I have too many products on several sub-categories. When I use ECTs CSS menu system, the vertical fly out menu for the sub categories extends way off the screen due to having too many products under certain categories.

I thought by getting the Dynamic Drop-Down extension, I would be able to take the categories and sub-categories and populate down-downs since we all know that a drop-down list will automatically add a vertical scroll bar if its contents exceed the height.

The Getting Started Guide uses an example where you have to use two different tables. My problem is - All of my data is in one table so I am having trouble wrapping my mind around how I can have a Parent and a Child with one table. I have tried creating Record Sets and using the Filters to point to the specific places in the table for both the Manufacturer and the Model, but all I can accomplish so far is to populate the list with the categories and sub categories names and no linkage from one to another nor from the second box to the actual path it needs to point to.

Any idea of how I can tackle this?

Jason Byrnes
10-04-2010, 06:48 AM
the key to dynamic dropdowns, whether using 1 table, 2 tables or more is creating your recordsets correctly.

the recordsets are where you create the parent child relationships.


The Create Dynamic Array behavior takes three pieces of data from your recordset:
Parent ID
Child ID
Child Name


The Parent ID is the column that is used to create the Parent to Child relationship. It will be used to compare the value coming from the parent select list.



The Child ID is the column that will be used for the value of the child list.

The Child Name will be used for the Label of the child select list.