How to Edit/Delete Data in MySQL database using servlet

This forum was posted on Friday, March 15, 2013 10:41:25 PM

if we are going to add new data in the database we use something like this
 Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection(
"jdbc:mysql://mysql.cityu.edu.hk:3306/" "yyy" "xxx");
stmt = con.createStatement();
stmt.run("USE yyy");
id = (String) request.getParameter("id");
text = (String) request.getParameter("text");
time = (String) request.getParameter("time");
query="insert into Table values(0 '" + id + "' 'ABC' '" + text + "' '" + time + "');";
int rs = stmt.executeUpdate(query);

but how about if we are going to edit/delete something in the DB? any tutorial? various Thank You! cheers!



 Views 123 Get Source Code >>
Related Tags:




Replies on "How to Edit/Delete Data in MySQL database using servlet" :

Nobody has replied on this post , be first to post answer.


Post Your Answer/Comment:

Please Login first to post Reply !


Note: Please Put Code into <code></code> block.

Threads related to "How to Edit/Delete Data in MySQL database using servlet":