Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp sqk question ? urgent

 
majid nakit
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a drop down list , so I can select each user or
select ALL to get all users like this :
FORM NAME="productGoto">
<FONT FACE="Arial,Helvetica" SIZE="-2">
Select By User:
<SELECT NAME="productList" onChange="gotoFunction()" onBlur="return
options[0].selected = true">
<OPTION VALUE=" "> Categories </OPTION>
<OPTION VALUE="All">All </OPTION>
<OPTION VALUE="Earl Peterson">Earl Peterson</OPTION>
<OPTION VALUE="WDS Domino Backup ">WDS Domino Backup</OPTION>
<OPTION VALUE="Mike Tripp">Mike Tripp</OPTION>
<OPTION VALUE="Heather Lowe">Heather Lowe</OPTION>
<OPTION VALUE="Maureen O'Gorman">Maureen O'Gorman</OPTION>
<OPTION VALUE="Addelmajid Lotfi">Addelmajid Lotfi</OPTION>
<OPTION VALUE="WDS Server ">WDS Server</OPTION>
<OPTION VALUE="<open> ">open</OPTION>
<OPTION VALUE="Carolynn Huntington ">Carolynn Huntington</OPTION>
<OPTION VALUE="Joe Richard ">Joe Richard</OPTION>
<OPTION VALUE="WDS - Video Station ">WDS - Video Station</OPTION>
<OPTION VALUE="Liza Nanni">Liza Nanni</OPTION>
<OPTION VALUE="Ursula Bethoney ">Ursula Bethoney</OPTION>
</SELECT>
</FORM>
When I select just one user it works, but when I select "ALL" it does not
here is the code :
<%
if ((category !=null) && !(category.equals("ALL")) )
{
category = (String)request.getParameter("category"); %>
<sql:query>
select * from pcinfo
where User = '<sql:escapeSql><%=category%></sql:escapeSql>'
</sql:query>
<%
} else if ((category ==null) | | (category.equals("ALL")) ){ %>
<sql:query>
select * from pcinfo order by User
</sql:query>
<%}
%>
thanks

 
Manjunath Reddy
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isnt "ALL" different from "All".
It might be the comparison problem..while ur html posts "All"..u r looking for "ALL"
cheers,
mpr
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic