I have a sql statement which brings up all records which relate to criteria set on a page before in session variables. One of the criteria needs to be multiple select, so I have the following array to get all the values from the listbox and put them in a session variable:
'allow for multiple select
dim intCount
'dynamic array
dim arraySkills()
'for each selected element in listbox
for intCount=0 to Request.Form.Item("lstSkills"
.count - 1
'dynamically increase array size but preserve contents
redim preserve arraySkills(intCount)
'populate array
arraySkills(intCount) = Request.Form.Item("lstSkills"
(intCount + 1)
next
'put array in session variable
session("SearchSkills"
= arraySkills
This works fine.
The question is how to use this info in a where clause of my sql statement. Usually I would retrieve the contents of the array, element by element, like this:
for intCount = 0 to ubound(session.contents("SearchSkills"
)
response.write session.contents("SearchSkills"
(intCount)
next
How on earth would I get this information in a sql statement?
Any help would be greatly appreciated!
'allow for multiple select
dim intCount
'dynamic array
dim arraySkills()
'for each selected element in listbox
for intCount=0 to Request.Form.Item("lstSkills"
'dynamically increase array size but preserve contents
redim preserve arraySkills(intCount)
'populate array
arraySkills(intCount) = Request.Form.Item("lstSkills"
next
'put array in session variable
session("SearchSkills"
This works fine.
The question is how to use this info in a where clause of my sql statement. Usually I would retrieve the contents of the array, element by element, like this:
for intCount = 0 to ubound(session.contents("SearchSkills"
response.write session.contents("SearchSkills"
next
How on earth would I get this information in a sql statement?
Any help would be greatly appreciated!