im trying to make an update query on my java, i keep getting error in my sql syntax but i already tried executing the query in my sqlyog and it worked, but it doesnt work in my program, here is my query
String query = "UPDATE t_surat_masuk SET kode_klasifikasi = '"+kode_klasifikasi+"',"
+ " pengirim = '"+pengirim+"',"
+ " no_surat = '"+no_surat+"', "
+ " tgl_surat = '"+tanggalsurat+"',"
+ " perihal = '"+perihal+"',"
+ " tgl_surat_masuk = '"+tanggalmasuk+"', "
+ " penerima = '"+penerima+"', "
+ " WHERE id_surat='"+id_surat+"'";
sorry for my bad english, thank you
?with NO quotes around it. The whole point of statements is that they handle the quoting for you.