Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Timyates: Modification for the all option

Posted on 2003-11-05
6
Medium Priority
?
177 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 100 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
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!

 

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

The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

704 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