Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String constructQueryValueRemove(String table, Pair pairIndex, String column){
- String query;
- if (pairIndex.getRight() instanceof Number){
- query = "UPDATE `"+table+
- "` SET `"+column+"` = NULL" +
- "WHERE `"+table+"`.`"+pairIndex.getLeft()+"` = "+pairIndex.getRight();
- } else {
- query = "UPDATE `"+table+
- "` SET `"+column+"` = NULL" +
- "WHERE `"+table+"`.`"+pairIndex.getLeft()+"` = '"+pairIndex.getRight().toString()+"'";
- }
- return query;
- }
- query = "UPDATE `"+table+"`"+
- "SET `"+column+"` = NULL" +
- "WHERE `"+table+"`.`"+pairIndex.getLeft()+"` = "+pairIndex.getRight();
Add Comment
Please, Sign In to add comment