🛠️ Code cleanup & added many new features #1

Merged
gnmyt merged 121 commits from features/code-cleanup into master 2021-09-02 13:34:00 +00:00
Showing only changes of commit ce8042c530 - Show all commits

View File

@ -117,12 +117,12 @@ public class MySQLConnection {
*/ */
public MySQLConnection update(String query, Object... params) { public MySQLConnection update(String query, Object... params) {
try { try {
int start = 1;
PreparedStatement ps = con.prepareStatement(query); PreparedStatement ps = con.prepareStatement(query);
for (Object current : params) {
ps.setObject(start, current); for (int i = 0; i < params.length; i++) {
start++; ps.setObject(i+1, params[i]);
} }
ps.executeUpdate(); ps.executeUpdate();
} catch (Exception err) { } catch (Exception err) {
err.printStackTrace(); err.printStackTrace();