Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Anessa
Starting Member
4 Posts |
Posted - 2005-11-17 : 12:46:04
|
Hello,There are 2 issues involving searching one table called 'types'.Fix #1: Display the word "All" when someone selects all types.I need help building a sql query to a table called 'types' based on a checkbox selection on a search form. The 'types' table contains 2 columns (TypeId with int of 4 and TypeName) there are 4 rows (Casualty, Health, Life, Pension). The search form is at http://www.actuary.org/ce_calendar/buildSearch.asp. The Practice Area is where the 'types' are chosen. What I need to display is if someone chooses "All", the resulting display will be "All", not Casualty, Health, Life, Pension.Fix #2: When someone chooses two or three types, display the results to include items where the chosen two or three types occur in one row, not just each individual occurrance in a single item. To see what I mean, test the search form via the url above by choosing two or three of the types and you'll see the issue.The code for the current 'types' search is...Sub buildPracticeArea()'######### Get Data ################getRecordSet "select typeId, typeName From Types order by typeName"'######### iterate through data set write each type #############do while not rs.eof%> <input type="checkbox" name="typeName" onclick="clearAll();" value="'<%=rs("typeName")%>'"> <%=rs("typeName")%><%rs.moveNextloop'######### iteration complete ###############rs.closeEnd SubThe results page, has this to call it for display...<%= rs("typeName")%>Any assistance would be very much appreciated!Anessa |
|
|
|
|
|
|