MySQL Forums
Forum List  »  MySQL Query Browser

Re: No response for Update query
Posted by: fu billy
Date: October 24, 2005 03:58AM

May i seek help here is JSP code for updating the database,
when i printout the query and paste it on the command prompt of mysql,
it can be executed and update the database, but if i do it, on a jsp file that is below to update the result is it cant be updated, and the int x would be 0, i dont know what is the problem, may i see your help!!! thx!!!!!!!!!!!!

PreparedStatement sql;

Connection dbconn;

ResultSet resultsabc;

Class.forName("com.mysql.jdbc.Driver");

dbconn = DriverManager.getConnection("jdbc:mysql://localhost/abc","root","root");

Statement stat = dbconn.createStatement();


int x =stat.executeUpdate("update course_detail set day_index=6 WHERE course='"+course_from_input+"';");

Options: ReplyQuote


Subject
Written By
Posted
Re: No response for Update query
October 24, 2005 03:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.