Merge pull request #10 from Snipa22/full_group_by_fix

Adding a fix for full_group_by SQL servers
This commit is contained in:
Snipa22
2017-02-11 12:02:33 -08:00
committed by GitHub
+2 -2
View File
@@ -286,11 +286,11 @@ function updatePoolStats(poolType) {
function (callback) { function (callback) {
debug(threadName + "Checking MySQL for total miners paid"); debug(threadName + "Checking MySQL for total miners paid");
if (typeof(poolType) !== 'undefined') { if (typeof(poolType) !== 'undefined') {
global.mysql.query("SELECT id FROM payments WHERE pool_type = ? group by payment_address, payment_id", [poolType]).then(function (rows) { global.mysql.query("SELECT id FROM payments WHERE pool_type = ? group by payment_address, payment_id, id", [poolType]).then(function (rows) {
return callback(null, rows.length); return callback(null, rows.length);
}); });
} else { } else {
global.mysql.query("SELECT id FROM payments group by payment_address, payment_id").then(function (rows) { global.mysql.query("SELECT id FROM payments group by payment_address, payment_id, id").then(function (rows) {
return callback(null, rows.length); return callback(null, rows.length);
}); });
} }