are four tables that I'm working with right now; one table that holds
information about different balls of yarns that I have. Three tables
are lookup tables, where the keys are used as foreign keys in the
main table, yarn.
The manufacturer table holds the names of companies that manufacture
different brands of yarn. So, I may have two brands of yarn
belonging to one manufacturer, but only one brand of yarn belonging
to another manufacturer.
Here is the query that I came up with to display all contents from yarn table.
select y.*, m.mfr_desc, b.brand_desc, sw.standard_wt_desc
from yarn y, manufacturer m, brand b, standardweighttype sw
where y.mfr_id = m.mfr_id
and y.brand_id = b.brand_id
and y.standard_wt_type_id = sw.standard_wt_type_id
order by m.mfr_desc
I set up a cfloop query to output table rows for the results from the
above query
Right now, this is how the output looks:
Broad Bay | Scottish Heather | Worsted
Brown Sheep | Handpaint Original | Worsted
Brown Sheep | Nature Spun Sport | Sport
Brown Sheep | Lamb's Pride | Worsted | Worsted
Dale of Norway | Heilo | Bulky
Dale of Norway | Tiur | Sport
What I want to do is set it up so that if I have at least two brands
from a manufacturer, only display the manufacturer's name in the
first row. So that it'll look like this:
Broad Bay | Scottish Heather | Worsted
Brown Sheep | Handpaint Original | Worsted
| Nature Spun Sport | Sport
| Lamb's Pride | Worsted | Worsted
Dale of Norway | Heilo | Bulky
| Tiur | Sport
What are some of the methods I could use to accomplish this? I know
there's ways to do this, but right now it's not coming to my mind . .
.
--
Lola - mailto:[EMAIL PROTECTED]
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Check out this blog: http://www.denbeste.nu
I'm in Bowie, MD, USA, halfway between DC and Annapolis.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

