This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Search and Result Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

Search and Result Page

Matt Hoffman
Ranch Hand

Joined: Jun 03, 2004
Posts: 83
I have a search page that is dynamically populated from the database. It has 4 pull down menus:
Artist:
Genre:
Parental Advisory:
Location:

I need to construct a SQL statement from the selections and display the results on a results.jsp page. Do you know of any good resources etc. on how to do this?

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60817
    
  65

I'm assuming that you are having no problems getting the values from the selections in your servlet, and that your question regards how to build up the appropriate SQL select statement from these values. (Correct me if wrong).

As such, I'm going to move this to the JDBC forum since the code to do so is pretty much JSP and Servlet independent.
[ June 03, 2004: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60817
    
  65

Not enough info. How are you treating the conjunction of the 4 values? Will any match? Must they all match? Must the matches be exact? Does case count? And so on.
Matt Hoffman
Ranch Hand

Joined: Jun 03, 2004
Posts: 83
Actually I have the SQL built already. I need some help in constructing the results look and feel. I am not sure how to display the results in the html tables and do the paging.

Thank for your help
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60817
    
  65

Ah, should have said so. OK, I'll close this and re-open the one in JSP.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Search and Result Page
 
Similar Threads
How about including a Search?
How can I do a text search in a file
Search and Result Page
Text Search on a file from a JSP page?????
Display different colors for links