mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Merge pull request #10 from Snipa22/full_group_by_fix
Adding a fix for full_group_by SQL servers
This commit is contained in:
+2
-2
@@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user