<cfquery name="eventlist1"> SELECT * FROM EVENTS WHERE PERMISSIONS IN <cfqueryparam value="#session.status#" list="true"> ORDER BY EVENT_DATE, EVENT_START ASC </cfquery>
Try that... On 9/4/07, Hugh Fidgen <[EMAIL PROTECTED]> wrote: > > Hiya, > > I've got a problem selecting data from a table and I was wondering if > anyone could help. > > Code so far: > > <cfquery name="eventlist1"> > SELECT * FROM EVENTS > WHERE PERMISSIONS IN ('#session.status#') > ORDER BY EVENT_DATE, EVENT_START ASC > </cfquery> > > This works fine where field permissions = 1 but when permissions = 1,2,x,x > and so on the query fails. Basically - how can I loop through the comma > delimeted values in the permissions variable and compare them each against > #session.status# until a match is found. > > Thanks so much, > Hugh > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287717 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4