string compare in table field
I have a field in a database called categories with values separated by commas, example.
Arts,Education,Sports,Poetry
This field was saved into the table thourgh a list box selection element.
now in my application the user selects values from a list box and those values are compare to the database field categories. If one of those values selected in the search appears in the categories field that row is selected for display. example
eventID Categories
13 Arts,Sports,Poetry
14 Sports,Poetry,Lecture,Math
15 Arts,Religion,Math,Geography
16 Sports,Poetry,Lecture,History
In application user selects from list box:
Arts,Religion,History
so the records to return are:
13 15 16
currently my application is accepting one value from the list box and it works fine, i am using the '%like with wildcard%' option, but I need to pass and compare multiple values.
|