Wow, I appreciate the quick response. That solved the problem perfectly! Thank 
you very much. Now I'm inspired to buy your CF8 books :)


>Do you want to OR or AND those fields?
>
>If OR, the SQL IN clause lets you specify a list if values, something like
>WHERE key IN (117,123,141). So, if #cb# is the field  with the list you can
>do WHERE key IN (#cb#).
>
>If AND, then just loop through the list and AND conditions.
>
>-- Ben
>
>
>Hey guys,
>
>I have a real simple problem here, but unfortunately, I can't seem to figure
>it out. I'm developing a site where there are different items that are
>listed, by using a loop on a database. Really simple stuff, just looping the
>row in the table with the different fields from the database.
>
>Anyway, my client wants to have a checkbox on every item (or record.) When
>the user wants to select a few of these items and look at only them, they'd
>check the items and press "compare selected." Techincally, all this does is
>filter the SQL query with the records that have been selected.
>
>I immediately thought this would be a simple task. All I have to do is loop
>the id of each of the checkboxes so that each record's checkbox would have
>the value of the record's id. Then I'd submit the selected IDs to a
>processor page, which would take the form variable and put it in a query
>string towards the main page listing the items. Then the IDs would go into
>the WHERE part of the SELECT query, and it would be beautifully filtered.
>
>HOwever, my problem is that when there are more than one checkbox selected,
>the value of each is put in a comma delimited list. Hence, if they select
>items 117, 123, and 141--the form variable would be 117,123,141. When I put
>this into the WHERE part of the query, it doesnt let me. The only way for a
>WHERE to have more than one value is to use ANDs, which I can' do since the
>commas are preprogrammed.
>
>Not sure if that's understandable or clear, but basically, all I want to do
>is filter a query based on several checkboxes that the user will select. An
>example of such is here: http://www.transauto.be/car/export.php?chx=12&lg=en
>
>
>Thanks. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295438
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to