Answered
cfinclude query: return result for specific row
I've been trying to crack this all day and I feel like if I
just had a nudge in the right direction I might be successful.
I have a query that returns the records for some textbooks that are at a specific school. I've normalized the textbook database so that the primary, secondary and tertiary subject categories are represented by the primary key of that category in its own table. As the query loops through the records, I want it to return the (varchar) subject category that goes with that (numerical) key in the table.
Since Coldfusion won't allow nested cfoutput, I've tried using cfinclude to grab the specific name for the subject category that goes with the current textbook - but what I've got so far returns all the subjects for the school id in each row - they're the right subjects! but I don't want all of them, just the right one with the right book/record. Can anyone suggest what I need to do? I'm attaching the code for the main page and for one of the cfincludes (they're identical except for "primary", "secondary" and "tertiary").
I realize I must be leaving something out but I can't figure out what. Thanks much in advance.
I have a query that returns the records for some textbooks that are at a specific school. I've normalized the textbook database so that the primary, secondary and tertiary subject categories are represented by the primary key of that category in its own table. As the query loops through the records, I want it to return the (varchar) subject category that goes with that (numerical) key in the table.
Since Coldfusion won't allow nested cfoutput, I've tried using cfinclude to grab the specific name for the subject category that goes with the current textbook - but what I've got so far returns all the subjects for the school id in each row - they're the right subjects! but I don't want all of them, just the right one with the right book/record. Can anyone suggest what I need to do? I'm attaching the code for the main page and for one of the cfincludes (they're identical except for "primary", "secondary" and "tertiary").
I realize I must be leaving something out but I can't figure out what. Thanks much in advance.
