This commit is contained in:
@@ -14,6 +14,8 @@ function runSQL(sqlQuery, connection, callback = (err, rows) => {
|
||||
console.log(err);
|
||||
throw err;
|
||||
}) {
|
||||
// Start the MySQL Connection
|
||||
//connection.connect();
|
||||
connection.query(sqlQuery, (err, rows) => {
|
||||
if (err) {
|
||||
console.log("SQL Error:", err)
|
||||
@@ -22,6 +24,7 @@ function runSQL(sqlQuery, connection, callback = (err, rows) => {
|
||||
console.log("RunSQL Returned Rows:", rows);
|
||||
callback(undefined, rows);
|
||||
})
|
||||
//connection.
|
||||
}
|
||||
|
||||
class RSSRecord {
|
||||
@@ -58,10 +61,7 @@ exports.Storage = class Storage {
|
||||
user: process.env.DB_USER,
|
||||
password: process.env.DB_PASS,
|
||||
database: process.env.DB_NAME
|
||||
});
|
||||
|
||||
// Start the MySQL Connection
|
||||
this.connection.connect();
|
||||
});
|
||||
|
||||
// Set the DB Table for later use
|
||||
this.dbTable = _dbTable
|
||||
|
||||
Reference in New Issue
Block a user