> I have an application where I use a list box from which
> multiple selections can be made.  When a selection is made
> and the form is submitted, that selections ID is sent to
> the appropriate table column. If two selections are made,
> both ID's are sent to the column, etc.
>
> My problem is that I can't query the data for display the way
> I want to because the query can't distinguish that there are
> 2 ID's in the column. Instead it seems to think there is just one.
>
> So if...
> Netscape has an ID of "1" and Internet Explorer has an ID of "2"
> and both are selected and input into the table column.. the
> data in the column looks like "12". But "12" isn't a valid ID
> so my query returns nothing.

There are two things you might consider.

You could store the IDs as a list in your field, instead of putting them
together as it appears you're doing now. Then, you could use the data as a
list with the SQL IN operator:

SELECT stuff
FROM   table
WHERE ID IN (ListOfBrowserIDs)

Or, you could normalize your tables, so that you don't store multiple
occurrences of data within a single field. You'd need a table to link
information to your browser list, so you might have one table, let's say
"User", another called "Browser", and a third to link users with browsers.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to