java - jdbc code to update informations in a mysql table -


i have code in java-eclipse update informations in table mysql values in selected row of table didnt update after running function.for example want replace value "b" inested of "a" in column "username" please me :(

a first value b value want replace username name of 1 column code:

   public void change("username","a","b") throws sqlexception{         prs=connect.preparestatement( "update user0 set " +s1+ "='" +s3+ "' '" +s1+ "'='" + s2+"'");         prs.execute();           }// end of function change 

that shouldn't compile, syntax wrong:

public void change(string username, string a, string b) throws sqlexception{...} 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -