The list may work ok when adding or removing the permissions for a single
user.

What if I want to know everyone in a given role? Now I have to come up with
a LIKE %something% query to find the right permissions in the list for each
user, or some other hack, which will run slowly.

If I want to know all of the roles available in the DB, I have to keep a
table containing all of these roles in addition to writing the names of
roles for each user. I also have to write my own code to validate each name
in the list against the roles table. Unless this is all done in the code,
which will make it harder to maintain for whoever didn't write it, since the
DB is no longer self-explanatory (e.g. developer looks at DB for roles that
can be used, doesn't find any, has to go through the code instead).


-----Original Message-----
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 26 February 2005 7:56 
To: CF-Talk
Subject: Re: sql question

 >>You bring everything back to CF, then

you loop through the list, change/delete stuff, then re-insert the list?

If you insist on doing it the most clumsy way, of course it looks worse ;-)
When updating, just loop on the list to generate check boxes in a form, then
just use one update statement to put the list back in place in the user
table.

By the way, you don't have either to "write the most effecient code for
extracting a value from a list"
to check if a user has a the right to do domething, you just need
listFind().

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196647
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to