If that's the extent of what you want to do then you could assign a doc as either 1 for teamA 2 for teamB or 0 for All. then say <cfset theteam=-- something to set variable to 1 for teamA or 2 for teamB> <CFQUERY name="docs" datasource="intranetv8"> SELECT docid, doctitle, docsummary, docpath, views FROM itdocs WHERE category2='#URL.category2#' AND (views=0 or views=#theteam#) </CFQUERY>
-----Original Message----- From: Ian Vaughan [mailto:[EMAIL PROTECTED]] Sent: 03 December 2002 12:03 To: CF-Talk Subject: Re: Personaliztion with Coldfusion ? I have been informed that user roles and groups for users is the best approach but how does this exactly work from a Coldfusion persepective, and is this the best way to achieve my brief, or is the way I am planning on going the best approach? This is my brief, I am creating an Intranet application that features a publishing area allowing users to add/delete/modify their own content on the site. Using html forms, CFFile and Oracle to hold word and pdf docs. And having a select form field where the user selects who should see the file teama, teamb or everybody However some users of the Intranet are from teama and should only be allowed to view documents related to teama. teamb have documents that only their team should see. Finally there will be some documents that users upload that are available to everybody. To access the Intranet the users have to log in, where their username and password is authenticated against the user table. The user table has fields.. id username password fname lname division If correct they enter the intranet. The click on the documents link where the following query would be run, I was thinking along the lines of adding a where clause perhaps ? using the info where the user selected when they added the content - i.e. should it be see by teama, teamb or everybody? Is this the best way to achieve this ???? <CFQUERY name="docs" datasource="intranetv8"> SELECT docid, doctitle, docsummary, docpath, views FROM itdocs WHERE category2='#URL.category2#' AND views='#what would go here that states what result of docs would be shown based on the user logged in. If the doc is only to be viewed by teama, teamb or everybody???#' </CFQUERY> ian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.