The posts are including apostrophes. So how to suppress them while executing the SQL Statement?
Should I use this or is there another good way?
Thanks for your help :)
Code:
term.replaceAll("'","''");
Thanks for your help :)
Code:
String uString = txtString.getText();
String cString = uString .replaceAll("'","''");
StringBuilder sb = new StringBuilder();
sb.append("UPDATE `tablename` SET ");
if (!cString.isEmpty()) {
sb.append("colum='" + cString+ "'");
}
sb.append(" WHERE .... ";");