Solved

Timyates: Modification for the all option

Posted on 2003-11-05
6
173 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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