> > <cfif #deptid# contains #session.privileges#>
>
> Avoid using this on lists
>
> The main reason is that if you're looking for "1", then it'll
> return 10, 11,
> 21, etc. etc.
>
> Try to use the List functions, or extend the CFIf to be;
> <cfif ",#deptID#," contains ",#session.priviliges#,">
> which is faster than the List functions

This would only work if the item were not the first or last element in the
list.

Either you would have to use a reg expression or ListFind(list, string [,
delimiter]) to search a thru the list.

Duane Boudreau
CFExperts.Com

------------------------------------------------------------------------------
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