This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 61976
    
  67

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: 61976
    
  67

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: 61976
    
  67

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