aspose file tools*
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
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: 61232
    
  66

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: 61232
    
  66

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: 61232
    
  66

Ah, should have said so. OK, I'll close this and re-open the one in JSP.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Search and Result Page