Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a table dynamically.

Status
Not open for further replies.

celley

Programmer
Jul 31, 2000
54
0
0
A2
In a table.... I have three fields.

First field is an autonumber.
Second field is titled "CateogoryName"
Third field is titled MainCategory.

1 Technical 0
2 Creative 0
3 Programmer 1
4 Author/Programmer 1
5 Audio/Video 0
6 Writing & Design 0
7 Management & Sales 0
8 Executive Officer 7
9 Interactive Producer 7
10 Project Manager 7
11 Production Manager 7
12 Presentation Coordinator 7
13 Account Manager 7
14 Sales & Marketing 7
15 Instructional Designer 6
16 Interactive Designer 6
17 Web Content Designer 6
18 Writer 6
19 Copy Editor 6
20 Proof Reader 6
21 Tester 6
22 Creative Director 2
23 Art Director 2
24 Graphic Designer 2
25 Production Artist 2
26 Illustrator 2
27 3D Animator 2
28 Video Producer 5
29 Videographer 5
30 Video Editor 5
31 Photographer 5
32 Voice Over Talent 5
33 Composer 5
34 Technical Director 1
35 Web Server Administrator 1
36 HTML Author/Editor 1
37 Internet Programmer 1
38 PC/Mac Systems Engineer 1


If the Maincategory number is 0, then it is a top level category. If it is anything else, it is a "child" of the number it has in there. For example, if it has a Maincategory of 5, then its parent is autonumber 5 (Audio/Video).

I need to create a table that takes all of the 0's and put them across the top as headers for the columns. And then take all of the rest of the sub-categories and put them in the respective column in the table.

anyone know how to accomplish this?

Thanks. [sig][/sig]
 
1. query the table, order by MainCategory;
2. using two <output>;(1)<cfoutput query=&quot;queryname&quot; group=&quot;MainCategory&quot;, <cfif #MainCategory# eq 0>#CateogoryName#</cfif>; (2)inside this query, next the code above, another <cfoutput>#authername#;#CateogoryName#;#MainCategory#</cfoutput>;
3. It well be better to put all in a HTML table
 
the whole thing is that i need to build the table dynamically as well. i can get the data to ouput... that isnt the problem.

Chad [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top