[Top] [All Lists]

multiple values in select box

Subject: multiple values in select box
From: "JoKnott"
Date: Mon, 27 Aug 2007 19:21:14 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
 I am trying to create a select box, where if the user chooses option "all" 
several variables are passed as a list to be used in a IN statement in my 
query. Doesnt seem to be working though, I think it's something to do with 
comma seperating the list but I can't seem to get it right.
 Any help much appreciated. Thanks. Code Below

 <select name="Faculty">
 <option value="BS,CC,EI,HE,HH,ID,RS">All</option>

 and then the query is:
 select count([06Student]) as stucount, domicileDesc
 from tbl_StudentRecord, tbl_People, LUtbl_Domicile, LUtbl_FeeStatus, 
 where tbl_StudentRecord.[06PersonNo] = tbl_People.PersonNo
 and tbl_People.Domicile = LUtbl_Domicile.DomicileCode
 and tbl_StudentRecord.[06FeeStatus] = LUtbl_FeeStatus.FeeStatus
 and tbl_StudentRecord.[06Programme] = IMPtbl_Programmes.Programme
 and Faculty in ('#url.fac#')
 and Domicile > '599'
 and Domicile < '900'
 and [06Programme] <> 'IDEPS'
 and (ReturntoHesa = 'Y' or ReturnToHesa is null)
 and [06StudentModuleStatusPAT] ='ST'
 Group by DomicileDesc
 ORDER BY count([06Student]) DESC

<Prev in Thread] Current Thread [Next in Thread>