<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
var x = document.getElementById("ch").name;
1.) Don't write Java code in JSPs. Put the code in a normal Java class and call that code from a servlet. Then when you get a problem post explaining what the error is.
2.) When you put the database code in a normal class, close all resources you used in a finally block or use the try with resources if on Java 7.
3.) Use a PreparedStatement when passing parameters to queries to prevent sql injection and make your code a bit faster.
The correct sql syntax for passing a comma separated set of values to a sql statement is with the 'in' keyword.
i.e. delete from patientDetailsData where PatientId in (42,69,7)
However that does not lend itself to a prepared statement.
The preferred method as per a prepared statement would preferably be executed within a loop.
What's gotten into you? Could it be this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop