Forums

This topic is locked

Filtering a recordset with a multi-select listbox

Posted 26 Apr 2002 02:54:53
1
has voted
26 Apr 2002 02:54:53 elliot larson posted:
I have a list of email addresses with three different category types. They are family, business, and girlfriends.

Ideally, I would like to filter the recordset with a multi-select listbox so I could choose to display one or two categories of email addresses at the same time. Of course, when you select more than one item in the multi-select listbox the variables passed in the URL string are comma delimited. The "WHERE" clause in the recordset's SQL doesn't know what to do with this, and returns an error.

Filtering with a sigle select list box has proved to be quite easy, but the multi-select has stumpted me.

Any help would be greatly appreciated.

Elliot

Replies

Replied 13 Oct 2002 20:17:25
13 Oct 2002 20:17:25 James Threadgill replied:
Have you solved this issue? Try using the IN directive like so: SELECT * FROM members
WHERE Category_ID IN ( Categories)



Edited by - on 13 Oct 2002 20:31:36
Replied 14 Oct 2002 13:34:12
14 Oct 2002 13:34:12 Rene Bommezijn replied:
Hello Wayne,

Have you ever tried this in Dreamweaver?

The first issue with this is that the IN-directive needs the values to be seperated by quotes en comma's.

The second issue is that Dreamweaver does something with quotes also - but unfortunately not on the places that you would like to have them.



<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Have you solved this issue? Try using the IN directive like so: SELECT * FROM members
WHERE Category_ID IN ( Categories)



Edited by - on 13 Oct 2002 20:31:36
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Reply to this topic