Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfoutput data into categories

Community Beginner ,
Oct 16, 2013 Oct 16, 2013

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

444
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Oct 16, 2013 Oct 16, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources