Copy link to clipboard
Copied
I have a database query that returns a book titile and list it ... however some of the books will have a category to them and I want to list the category and then the books titles under that ... Do I need to create an array or can I do it in a cfloop.
Sample
BookTitle 1
BookTitle 2
Category
BookTitle 1
BookTItle 2
Booktitle 3
Copy link to clipboard
Copied
Depending on how your query recordset is structured, If you are using <cfoutput>, you should be able to use the "group" attribute to group on your category. Just specify the name of the column that holds the categories. I believe that books without categories will get lumped together.
-Carl V.