It might make a lot more sense to use another table to store these values, instead of trying to build vague "true, true, false" lists.
You'd store, in addition to the PK for this table (because every table has a PK, right? RIGHT?) the PKs for the page and sponsor that are connected. That is, if Sponsor 1 wants pages 3 and 4 and Sponsor 2 wants pages 4 and 5 you might end up with a table like this: LinkID SponsorID PageID 1 1 3 2 1 4 3 2 4 4 2 5 Does this make sense? --Ben Doom Joel Watson wrote: > Thanks for the response. One of the issues I am running into is that (and I > failed to mention this in my original post) the checkboxes are being > dynamically generated from another table called "Pages." So then, for > whatever reason, my list is being wr > itten with values for every checkbox, regardless of whether they are checked > or not. > > So, if have checkboxes "index", "localnews" and "sports", i will get a list > with a number of items which match the selections and non-selections > (e.g.,"true,true,false"). > > One solution that I tried was using radio buttons instead in order to submit > the actual page names (e.g., instead of "true,true,false," submit > "index,localnews,sports"). However, I found that if I did not select a > particular item--say, "obituaries"--on > submit I would be thrown a scope error. > > If I could get this method to work, it would be great. Unfortunately, at the > present the only luck I've had is to submit the boolean values of the > checkbox. Obviously, this leaves me in the predicament mentioned before in > needing to find a way to loop > over each list of each sponsor in order to display on the proper pages. > > Any other ideas? > > >> (Your message is a bit confusing, but I'll go with what I think you might be >> asking) >> >> Unselected checkboxes are never submitted, so you'll only ever get a list of >> trues. >> >> Set the values of the checkboxes to the id's of the items. >> >> Then you wont need do any looping, you'll just do this: >> >> <cfquery...> >> SELECT * >>FROM sponsors >> WHERE pagename IN (<cfqueryparam value="#Form.pagenames#" list="true"/>) >> </cfquery> >> >> >> (Or something along those lines) >> >> >>> Joel > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273941 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

