Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic query to display dynamic results??

 
rich werth
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my code to fill a drop down
<select name="loc">
<%
int i=0;
while (rs.next()) {
i++;
String location = rs.getString(1);
%>
<option value=<%= i %>><%= location %>
<% } %>
</select>
this is the default query i run on the page so it doesn't load blank
<%
String queryStr3 = "Select * from NON_IT where REQUESTOR_NAME = 'jane user'";
ResultSet eresults = dept.executeQuery(queryStr3);
%>
i would like to know how to build a dynamic query from what the user selects in the drop list and have that populate the same page with the new results when the user presses the submit button. can someone help me?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic