View Single Post
  #1 (permalink)  
Old 11-08-03, 02:52 PM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 510
Thanks: 1
Thanked 1 Time in 1 Post
Show query results by in a different way

I'm helping a friend set up a result query, and want the results displayed a certain way. There is a table which contains manufactures and their products. Each entry/row has id, mfg, longproductname, shortname, etc. As it is, this query (intentionally) only brings up the manufacturer name and product name. The product name will link to another query page (passing the row "id" through an anchor tag) which brings up the entire row of that product. Fine, no problems there.
Where I'm stuck is on the first query. Currently, the query brings up id, mfg, and shortname, and displays as such...

Manufacturer "A" product 1
Manufacturer "A" product 2
Manufacturer "A" product 3
Manufacturer "B" product 1
Manufacturer "B" product 2

Ideally, we want the display this way...

Manufacturer "A"
product 1
product 2
product 3

Manufacturer "B"
product 1
product 2

etc., etc.

I cant figure out how to display the mfg name once, then loop thru and list all of the products for that mfg, then list the next mfg name, then their products, and so on. Would each manufacturer need to have their own table to do this, or is there a way with the current set up?
Reply With Quote