Question

I'm trying to index a database table using a <cfindex>. I also want to categorize the index based on the values of a column of the same table. No documentation I have come across clearly mention what the "category" attribute takes. Is it a column name or just any desire value and if the later then how do the index determine which record belongs to what category?

Thanks a lot in Advance.

| ID | CATEGORY |  NAME  |     DETAILS     |    DATE    |
| 1  | people   |  John  |  John details   | 01/23/1980 |
| 2  | animal   |  Dog   |  dogs details   | 02/22/1990 |
| 3  | people   |  Ben   |  Ben's details  | 10/10/2006 |
| 4  | animal   |  panda | panda's details | 07/17/2009 |
Was it helpful?

Solution

The docs didn't make it clear, but if you are indexing a database and there is a column that you want to use for the category, just pass the name of the db column to the category attribute.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top