p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 5th, 2009, 01:23 PM
Authorized User
Points: 399, Level: 6
Points: 399, Level: 6 Points: 399, Level: 6 Points: 399, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2007
Location: Edgewood, NY, USA.
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating sub categories?

hello all. I have a table that lists names of categories (i.e., Food Service, Plumbing, Lab Safety).

I have another table called subcategories. This table has names that are tagged to appear in the proper main categories listed above.

The problem is I cant figure out the code to allow a loop through the records and display the correct sub category table to appear under the correct category.

Assuming my tables are set up correctly, how can I just loop the main categories as a list, and then loop all the related sub categories to appear below them?

ie,

FOOD SERVICE (Main category)
Commercial Dishwashers (sub category)
Grills (sub category)
Sinks (sub category)

I appreciate a starting direction here. I am using MySQL and .asp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old August 30th, 2009, 12:17 PM
J_P J_P is offline
Registered User
Points: 24, Level: 1
Points: 24, Level: 1 Points: 24, Level: 1 Points: 24, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2009
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

use nested loops
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sort categories using checkbox melvados Visual Basic 2005 Basics 2 August 5th, 2008 09:45 PM
Sub Categories for Forum- tectrix BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 9 May 21st, 2008 06:25 PM
Unlimited categories golden_drifter Access 2 August 31st, 2006 08:21 AM
Deleting Categories spardoe BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 July 19th, 2006 04:07 AM
Need help : how to query multiple categories will2kready SQL Language 0 January 10th, 2006 09:37 PM



All times are GMT -4. The time now is 07:35 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc