0

Moved files to use the gradle structure

This commit is contained in:
David
2018-11-06 16:16:01 +01:00
parent 54a6cbf4c8
commit 4810dcf339
52 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package com.redstoner.misc.mysql;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class MysqlQueryHandler {
public static ResultSet queryResult(Connection connection, String query) {
try {
Statement statement = connection.createStatement();
ResultSet results = statement.executeQuery(query);
return results;
} catch (SQLException e) {
e.printStackTrace();
return null;
}
}
public static boolean queryNoResult(Connection connection, String query) {
try {
CallableStatement statement = connection.prepareCall(query);
statement.execute();
return true;
} catch (SQLException e) {
e.printStackTrace();
return false;
}
}
}