|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
multiple select list problem
i have a CFSELECT used in a search that works fine when only one attribute is selected for search... here are the two pieces of code, the first is from the input form, the second is from the SQL search query...
<CFSELECT name="category" multiple="yes" size="4"> <OPTION value="">---------- <CFOUTPUT query="categoryQuery"> <OPTION value="#Category#">#Category# </CFOUTPUT> </CFSELECT><br> ------------------------------------------------- SELECT ... WHERE Category IN('#form.Category#') I've tried a few different things, putting the ' 's on the form values, putting them on the SQL query, but the problem is that if multiple values are selected like Cat AND Dog, it submits the value 'Cat,Dog' instead of 'Cat','Dog'... and obviously 'Cat,Dog' is not found in the database... Can anyone help? Thanks!!!
__________________
Reinventing the wheel again Last edited by mateoc15 : April 8th, 2004 at 02:52 PM. |
|
#2
|
||||
|
||||
|
anyone? this is driving me crazy
|
|
#4
|
||||
|
||||
|
thanks... sometimes it's just a matter of knowing about the existence of a particular function... that works great...
thanks again |
|
#5
|
|||
|
|||
|
You could also try:
listChangeDelims( list, "','", "," ) but listQualify() is a bit more elegant. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > multiple select list problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|