Change to database class
This commit is contained in:
parent
7c7fbbdfa6
commit
35984bc18c
1 changed files with 9 additions and 0 deletions
|
@ -105,6 +105,9 @@ public class Database {
|
|||
if(!connected())
|
||||
connect();
|
||||
|
||||
if(!connected())
|
||||
return false;
|
||||
|
||||
stopPool();
|
||||
try {
|
||||
PreparedStatement statement = connection.prepareStatement(query);
|
||||
|
@ -135,6 +138,9 @@ public class Database {
|
|||
if(!connected())
|
||||
connect();
|
||||
|
||||
if(!connected())
|
||||
return 0;
|
||||
|
||||
stopPool();
|
||||
try {
|
||||
PreparedStatement statement = connection.prepareStatement(query);
|
||||
|
@ -165,6 +171,9 @@ public class Database {
|
|||
if(!connected())
|
||||
connect();
|
||||
|
||||
if(!connected())
|
||||
return null;
|
||||
|
||||
stopPool();
|
||||
try {
|
||||
PreparedStatement statement = connection.prepareStatement(query);
|
||||
|
|
Reference in a new issue