Solved

Timyates: Modification for the all option

Posted on 2003-11-05
6
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
Invest in your employees with these five simple steps to improve employee engagement and retention.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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