@ -564,7 +564,7 @@ Currency.prototype.query_rank = function(data, callback) {
});
// 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;";
__self.db.execute(sql, function(rows) {
@ -573,6 +573,9 @@ Currency.prototype.query_rank = function(data, callback) {
callback(ranks, total);
var file = require('fs');
file.appendFile('./../logs/error-log.txt', sql+'\n', function(d){});
};
Currency.prototype.query_top = function (data, callback) {