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