I got the solution for my previous question, I added <sql:escapeSql> to
prevent the problem of space.
My question now is : 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
>From: sufi malak <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: jdbc taglib question ??
>Date: Wed, 5 Sep 2001 15:52:43 +0000
>
>Hi, I am using the jdbc taglib , could you please show me what's wrong here
>:
>
><sql:query>
> select * from pcinfo where User = '<% =category %>'
></sql:query>
>Thanks
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>http://java.sun.com/products/jsp/faq.html
>http://www.esperanto.org.nz/jsp/jspfaq.html
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets