Fix poles
This commit is contained in:
parent
58724835ae
commit
8678b3035b
@ -162,10 +162,11 @@ impl<'a> DatabasePole{
|
||||
.unwrap();
|
||||
statement.bind((1, group_id)).unwrap();
|
||||
statement.bind((2, date)).unwrap();
|
||||
match statement.next().unwrap() {
|
||||
State::Row => statement.read::<i64, _>(0).unwrap(),
|
||||
State::Done => 0,
|
||||
let mut ret = 0;
|
||||
while statement.next().unwrap() == State::Row {
|
||||
ret += statement.read::<i64, _>(0).unwrap();
|
||||
}
|
||||
ret
|
||||
}
|
||||
|
||||
pub fn get_top_users(&self, group_id : &str) -> Vec<(i64,String)>{
|
||||
|
Loading…
Reference in New Issue
Block a user