Solved

Timyates: Modification for the all option

Posted on 2003-11-05
6
170 Views
Last Modified: 2010-04-01
Hi,
  I forgot to meantion, what if the user chooses all from the drop down list,
<option>All</option>
the whole table needs to be displayed , how do i do that and if the keyword or choose chosen is not inside the database, how to display
'Sorry no results are found..
0
Comment
Question by:Jasbir21
  • 3
  • 3
6 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 25 total points
ID: 9687844
<option value="*">All</option>

should do it ;-)

And change:

      while( rs.next() )
      {
%>
    <tr>
      <td align=center><%= rs.getString( "skillid" ) %></td>
      <td align=center> <%= rs.getString( "skilldescription" ) %></td>
    </tr>
<%
      }

to:

      if( rs.next() )
      {
          do
          {
%>
    <tr>
      <td align=center><%= rs.getString( "skillid" ) %></td>
      <td align=center> <%= rs.getString( "skilldescription" ) %></td>
    </tr>
<%
          } while( rs.next() ) ;
      }
      else
      {
<%
    <tr>
      <td colspan="2" align=center>Sorry, no results found</td>
    </tr>
%>
      }
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9687851
For everyone who doesn't know what this is about, it is to do with:

http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20788645.html

:-)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9688087
Hope that sorted it!  I'm off on holiday for 5 days!

Wheeee!  Amsterdam, here I come ;-)
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:Jasbir21
ID: 9691193
Hi,
   the error i am getting is :
Executing Select skillid,skilldescription from skill WHERE ( skillid = '*' )  Sorry, no results found
when i choose the all option...
0
 

Author Comment

by:Jasbir21
ID: 9691529
How do i ask it to search for other fields as well and not just skilldescription:

When i tried this , i got error

 where += "( skilldescription LIKE '%" + word +"%',skillid LIKE '%" + word + "%')" ;


Thanks
0
 

Author Comment

by:Jasbir21
ID: 9698004
Tim,
  I have more questions and modifications concerning search by keyword, pls look at it at
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20789534.html

My problem is that what happens if values need to be chosen from different tables.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

A Short Story about the Best File Recovery Software – Acronis True Image 2017
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now