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:295404
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to