I'm working on security for a website built with ColdFusion MX and an MS SQL 2000 back end. The security consists of a table for ...
users
roles
email lists
and tables associating users to roles and users to email lists.
I want to pull a list of all the users along with their roles and email lists. But I only want one line per user. I want columns for name, email, badge ID, list of roles, and list of email lists. I can acheive the last two sublists by running queries within a loop in ColdFusion. But that would be two database hits per person, I'm worried about performance.
How could I pull a list of the person's roles and put that into a single cell of the main query?
users
roles
email lists
and tables associating users to roles and users to email lists.
I want to pull a list of all the users along with their roles and email lists. But I only want one line per user. I want columns for name, email, badge ID, list of roles, and list of email lists. I can acheive the last two sublists by running queries within a loop in ColdFusion. But that would be two database hits per person, I'm worried about performance.
How could I pull a list of the person's roles and put that into a single cell of the main query?