Solved

Timyates: Modification for the all option

Posted on 2003-11-05
6
175 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
Independent Software Vendors: 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Getting to know the threat landscape in which DDoS has evolved, and making the right choice to get ourselves geared up to defend against  DDoS attacks effectively. Get the necessary preparation works done and focus on Doing the First Things Right.
Let's recap what we learned from yesterday's Skyport Systems webinar.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

626 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