pro_jsp thread: query : (select * from product where client_id = " + iputID); didn;t work
make sure that Your client_id is a Numeric field and not string
Regards,
Roy Ngan
----- Original Message -----
From: <ngngachuen@i...>
To: "Pro_JavaServer_Pages" <pro_jsp@p...>
Sent: Sunday, February 18, 2001 7:22 AM
Subject: [pro_jsp] query : (select * from product where client_id = " +
iputID); didn;t work
> hi all.
>
> i try to execute a query from postgresql by the following code :
>
> -------code ----
>
> String getInput = request.getParameter("input");
>
> // getInput = apple
>
> ResultSet myResultSet =stmt.executQuery(" select * from product where
> client_id =" + getInput );
> but when i run the code , the error said that "attribute 'apple' not
found
> !!!!
>
>
> but when i write it in other way :
> ResultSet myResultSet =stmt.executQuery(" select * from product where
> client_id =' apple' " );
> it is ok !
>
> can anyone tell me why ?? and how can i slove this problem ?
>
> thx !
> ngachuen