MySQL Forums
Forum List  »  Newbie

Retrieving parent-child data
Posted by: Pablo Verano
Date: April 01, 2005 10:43AM

Hi,

I need to build a database driven DHTML menu.
The data should be retrieved from these two tables:

X_products_categories
'STORE_ID'__'CATEGORY_ID'__'CATEGORY'
1___________16______________palm pilots
1___________20______________Digital camera
2___________23______________Stands
2___________18______________Cameras
1___________19______________nikon
1___________22______________stands



X_products_sub_categories
'STORE_ID'__'CATEGORY_ID'__'SUB_CATEGORY_ID'____'SUB_CATEGORY'
1___________18______________9 ______________________Memory cards
1___________16______________12_____________________Stylus
1___________20______________11_____________________Flash cards
2___________18______________13_____________________Flash
2___________18______________14_____________________Lens
1___________20______________15_____________________lens
1___________19______________16_____________________filter
2___________23______________18_____________________sub stands


How can I do to get the data in a way it is easy to display?
I think that I might use an array where each row is a CATEGORY_ID, having in the columns the different sub categories.

Thank you in advance! :)

Options: ReplyQuote


Subject
Written By
Posted
Retrieving parent-child data
April 01, 2005 10:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.