Skip to main content
Known Participant
October 16, 2013
Question

cfoutput data into categories

  • October 16, 2013
  • 1 reply
  • 481 views

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

    This topic has been closed for replies.

    1 reply

    Carl Von Stetten
    Legend
    October 16, 2013

    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.