Hi Moloy,

Store the cityname in a String variable like
String str1=req.getParameter("mcity");
and the give the following select query statement

select fname,lname from contact,comp where contact.id
= comp.id and comp.city = '"+str1+"';

Regards
Mehdi Nawaz

--- Moloy Biswas <[EMAIL PROTECTED]> wrote:
> hello all
>
> I am facing a problem, I am trying to get some input
> from the user and
> based on the input I want to make a resultset with
> the Select statement
> in my servlet.
>
> Supposing I am taking a cityname as input from using
> getParameter() and
> then I am putting in the where clause of the select
> statement. its not
> working ...
>
> my select statement is somewhat like this
>
> select fname,lname from contact,comp where
> contact.id = comp.id and
> comp.city = req.getParameter("mcity");
>
> where mcity is the text input in my html
>
> please help
>
> Moloy
>
>
>
--------------------------------------------------------------
> SREI INTERNATIONAL FINANCE LTD., CALCUTTA, INDIA
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to