try plugin statement execute INSERT INTO skybans bans id nickname ban_

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
try {
plugin.statement.execute("INSERT INTO `skybans`.`bans` " +
"(`id`, `nickname`, `ban_priority`, `banned_by`, `reason`, `banned_time`, `permanent`)" +
" VALUES ('" + args_nickname_target + "', '" + args_nickname_target
+ "','" + 0 + "', ' " + sender_name + "',' " + ban_message + "',' " + plugin.formatForDateNow.format(new Date()) + " ', '" + 1 + "');");
} catch (SQLException e) {
try {
plugin.statement.execute("UPDATE `skybans`.`bans` SET" + "`nickname` = '" + args_nickname_target + "', `ban_priority` = '" + 0 +"', `banned_by` = ' " + sender_name + "', `reason` = '" + ban_message + "', `banned_time` = '" + plugin.formatForDateNow.format(new Date()) + "', `permanent` = '" + 1 + "'" + "WHERE (`id` = '" + args_nickname_target + "');");
} catch (SQLException ex){
e.printStackTrace();
}
}