How can I update my SQL Table column with the value that is stored in a local variable.
In my program I have taken value from the HTML page using the following statement:
String idd=request.getParameter("id");
String report=request.getParameter("rprt");
So now I have to update the value of report in my database table named "ptest" and I am using the following query:
Class.forName("com.mysql.jdbc.Driver"); 
java.sql.Connection con = 
DriverManager.getConnection("jdbc:mysql://localhost:3306/tcs","root","root"); 
Statement st= con.createStatement(); 
ResultSet rs; 
int i=st.executeUpdate("update ptest set result = @reprt where patient_id= 
@idd");
out.println("Successfully Entered");   
But the value is not being stored in the database instead NULL is being stored.
I have already seen this question and got no help. Question
Please ignore my mistakes if any in this question as I am new to MYSQL.
 
     
     
    