> 1. Create a list of current categories assigned to the locale
> 2. query all the categories
> 3. output the query, and select the category if its in the list
> <cfoutput query="GetCategories">
>       <cfif CurrentCategories contains GetCategories.Category_ID>
>               <option value="#Category_ID#"
> selected>#Category_Description</option>
>       <cfelse>
>               <option
> value="#Category_ID#">#Category_Description#</option>
>       </cfif>
> </cfoutput>

Avoid using CONTAINS on a list - if you are looking for 1, then it appears
in 10,11... 21, 31 etc.

Treat it as a list, and use the list functions - or for speed, convert the
list to an array, and use the array functions.

Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to