Title: Message
hi guys,
 
Id like these results to be dispalyed in a table with 3 columns
- do i need to write a query for each catagory or is there a better way? (we are using cf5)
 
<cfquery datasource="#dsn#" name="qProds">
select distinct catagory, type, description, COUNT(styleName) AS styleQty
from products
where products.active = "yes"
group by catagory, description, type
order by catagory, type
</cfquery>
 
<cfoutput query="qProds" group="catagory">
  <h2>#catagory#</h2>
  <cfoutput group="type">#type#<br>
     <cfoutput group="description"><li>#description#, <strong>(#styleQty#)</strong></li><br>
</cfoutput></cfoutput></cfoutput>
-----------------------
result
----------------------
ACCESSORIES
BAG
 BACKPACK, (1)
CAP
 CAP, (1)
 VISOR, (1)
 TRUCKER CAP, (3)
TOWEL 
 TOWEL, (1)
 
MENS
BOTTOMS
 WALKSHORTS, (3)
 3/4 PANTS, (1)
LIFESTYLE
 REVERSIBLE BOARDSHORTS, (1)
 WETSHIRT, (1)
PRINTS
 BASIC T, (8)
 TRUCKER SINGLET, (2)
 SLEEVELESS T, (3)
 
WOMEN
BIKINIS
 BIKINI TOP, (1)
 BIKINI BOTTOM, (2)
BOTTOMS
 KNICKERBOCKER, (1)
 ZIP-OFF SKIRT, (1)
 UNDIES, (1)
 WALKSHORTS, (1)
 CINCHED SIDE SHORT, (1)
 DENIM SHORT, (1)
Steve Soars
Interactive Redlands
 
www.i-redlands.net
 
Shop 2 Cleveland Town Square
Cnr Queen & Bloomfield Sts
Cleveland Qld Australia 4163
p: +61 7 3821-5800
f: +61 7 3821-5811
 
Instant Messaging
msn: [EMAIL PROTECTED]
icq: 298661060
yahoo: [EMAIL PROTECTED]
 
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to