I'm trying to display options for homes and the categories in which they're in. Formatted in this way:
Category 1 Category 2
---------- ----------
option 1 Option 2
I have gotten very close. The options are showing up as expected, but the categories are repeating themselves. I've included an image.
I've tried all combinations of group in the CFOUTPUT and in the SQL with no success. I would appreciate some ideas. This is my current code:
<cfquery datasource="applewood" name="categorize">
SELECT idOptions
, options.option
, options.idOpCategories
, op_categories.categoryName
FROM options, op_categories
GROUP BY idOptions
</cfquery>
...
<cfoutput query="categorize" group="idOpCategories">
<h3>#UCASE(categoryName)#</h3>
<ul>
<cfoutput>
<li>#option#</li>
</cfoutput>
</ul>
</cfoutput>
Update:
I ordered and grouped by the same column and getting this result:


ORDER BYin the SQL andGROUPin thecfoutput- Scott StrozORDER BYI get what you see at link - Phillip Perrycfoutput group. Repeating generally means your query is not sorted properly. Can you please post your query? Also, what is "idOpCategories" and how does it relate to "CategoryName"? - Leighcfoutput groupwill definitely make the cut ;-) - Leigh