Browse Source

Fixed multi_response !rank

master
Brandon Cornejo 11 years ago
parent
commit
099f9ec5e6
  1. 5
      lib/currency.js

5
lib/currency.js

@ -564,7 +564,7 @@ Currency.prototype.query_rank = function(data, callback) {
}); });
// remove last or // remove last or
inner_sql=inner_sql.slice(0,-3);
inner_sql=inner_sql.slice(0,-4);
sql += "select * from (select user, points, @row_number:=@row_number+1 from viewers order by points desc) as rank where ("+inner_sql+");select count(1) from viewers where points > 0;"; sql += "select * from (select user, points, @row_number:=@row_number+1 from viewers order by points desc) as rank where ("+inner_sql+");select count(1) from viewers where points > 0;";
__self.db.execute(sql, function(rows) { __self.db.execute(sql, function(rows) {
@ -573,6 +573,9 @@ Currency.prototype.query_rank = function(data, callback) {
callback(ranks, total); callback(ranks, total);
}); });
var file = require('fs');
file.appendFile('./../logs/error-log.txt', sql+'\n', function(d){});
}; };
Currency.prototype.query_top = function (data, callback) { Currency.prototype.query_top = function (data, callback) {

Loading…
Cancel
Save