Hi,
Try this, this should work.
city_name = req.getParameter("mcity");
"select fname,lname from contact,comp where contact.id = comp.id and
comp.city = " + "'" + city_name + "'";
Regards
pidix
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Moloy
> Biswas
> Sent: Wednesday, March 08, 2000 7:15 PM
> To: [EMAIL PROTECTED]
> Subject: help in servlet report
> Importance: High
>
>
> 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
>
___________________________________________________________________________
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