RE: selecting multiple records in a select box
It sounds like it's a simple as: , if you only need to look at one record from get_tobacco, If you need to compare to all record, try: Bob -Original Message- From: Jon Tillman [mailto:[EMAIL PROTECTED]] Sent: March 19, 2001 9:24 AM To: CF-Talk Subject: Re: selecting multiple records in a select box -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What it returns is something like: get_tobacco.tobaccoId = 1 get_tobacco.tobaccoContents = '2, 4, 5, 7' I am comparing get_tobacco.tobaccoContents and get_content.ContentsID, hopefully. On Monday 19 March 2001 09:13 am, you wrote: > Does get_tobacco contain an ID field? If you're comparing two sets of > ID's, my CF_Venn tag can do that: > > CF_Venn ListA="#ValueList(Contents.ContentsID)#" > ListB="#ValueList(get_tobacco.theID)#" AandB="matches"> > > The heart of the relevant code is simply: > > > > > > > > -David > > On Monday, March 19, 2001 5:35 AM, Jon Tillman > [SMTP:[EMAIL PROTECTED]] > > wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > I have a string of numbers, seperated by commas, stored in a text field > > in a table, call it tblItem. > > These numbers each correspond to a primary key in tblContent. > > I build a select box by looping over all the primary keys in tblContent, > > like > > > > this: > > > > > > SELECT * > > FROMTblContent > > > > > > > > > > #ContentsName# > > > > > > > > > > Now, what I want to do is to add a bit of code to this that will check > > for a match between the ContentsID from my option and any of the values > > in the string from this query: > > > > > > SELECT * > > FROMtblItem > > WHERE ItemID = #url.ITEM# > > > > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: selecting multiple records in a select box
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What it returns is something like: get_tobacco.tobaccoId = 1 get_tobacco.tobaccoContents = '2, 4, 5, 7' I am comparing get_tobacco.tobaccoContents and get_content.ContentsID, hopefully. On Monday 19 March 2001 09:13 am, you wrote: > Does get_tobacco contain an ID field? If you're comparing two sets of > ID's, my CF_Venn tag can do that: > > CF_Venn ListA="#ValueList(Contents.ContentsID)#" > ListB="#ValueList(get_tobacco.theID)#" AandB="matches"> > > The heart of the relevant code is simply: > > > > > > > > -David > > On Monday, March 19, 2001 5:35 AM, Jon Tillman > [SMTP:[EMAIL PROTECTED]] > > wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > I have a string of numbers, seperated by commas, stored in a text field > > in a table, call it tblItem. > > These numbers each correspond to a primary key in tblContent. > > I build a select box by looping over all the primary keys in tblContent, > > like > > > > this: > > > > > > SELECT * > > FROMTblContent > > > > > > > > > > #ContentsName# > > > > > > > > > > Now, what I want to do is to add a bit of code to this that will check > > for a match between the ContentsID from my option and any of the values > > in the string from this query: > > > > > > SELECT * > > FROMtblItem > > WHERE ItemID = #url.ITEM# > > > > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: selecting multiple records in a select box
Does get_tobacco contain an ID field? If you're comparing two sets of ID's, my CF_Venn tag can do that: CF_Venn ListA="#ValueList(Contents.ContentsID)#" ListB="#ValueList(get_tobacco.theID)#" AandB="matches"> The heart of the relevant code is simply: -David On Monday, March 19, 2001 5:35 AM, Jon Tillman [SMTP:[EMAIL PROTECTED]] wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I have a string of numbers, seperated by commas, stored in a text field in a > table, call it tblItem. > These numbers each correspond to a primary key in tblContent. > I build a select box by looping over all the primary keys in tblContent, like > > this: > > > SELECT * > FROMTblContent > > > > > #ContentsName# > > > > > Now, what I want to do is to add a bit of code to this that will check for a > match between the ContentsID from my option and any of the values in the > string from this query: > > > SELECT * > FROMtblItem > WHERE ItemID = #url.ITEM# > ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists