you have two options...
leave the isFeatured column out of the SELECT clause so that the DISTINCT
operator works,
OR
order the results by product name then
<cfoutput query="products" group="productName">
....
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
-----Original Message-----
From: Jeff Beer (E-mail) [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 1:11 PM
To: CF-Talk
Subject: SQL help
I have a products table with odd products..
Each product name exists in the table three times - they are actually
seperate products seperated by the product ID and some other attributes.
I'm trying to query the DISTINCT product names to output so the site admin
can assign Featured status to certain products.
product1: (checked)
product2: (checked)
product3: (checked)
product8: ()
product9: ()
etc
Selecting distinct names is no problem without the Featured column. Once
something is flagged, another instance of the same item is selected -
because the row is no longer distinct.
product1: (checked)
product2: (checked)
product3: (checked)
product8: ()
product9: ()
product1: () <---
product2: () <---
etc
Any ideas? I really don't want to normalize the table any further - the
products don't necessarily have to have the same names - they just usually
do - and can be changed at any time.
TIA!
Jeff Beer
Director of Application Development
Digital Stormfront, Inc
http://www.digitalstormfront.com <http://www.digitalstormfront.com>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists