def highscore(self): tx_total = "SELECT user, tx_total FROM stats ORDER BY tx_total DESC LIMIT 1" rx_total = "SELECT user, rx_total FROM stats ORDER BY rx_total DESC LIMIT 1" txs = "SELECT user, txs FROM stats ORDER BY txs DESC LIMIT 1" rxs = "SELECT user, rxs FROM stats ORDER BY rxs DESC LIMIT 1" con = "SELECT user, connections FROM stats ORDER BY connections DESC LIMIT 1" tx_total = Database.get_all_rows(tx_total) rx_total = Database.get_all_rows(rx_total) txs = Database.get_all_rows(txs) rxs = Database.get_all_rows(rxs) con = Database.get_all_rows(con) return (tx_total, rx_total, txs, rxs, con)
def topFiveUpload(self): sql = "SELECT user, txs FROM stats ORDER BY txs DESC LIMIT 5" return Database.get_all_rows(sql)
def aboveConnectionLimit(self, limit): sql = "SELECT User FROM stats WHERE Connections > %i" %(limit) return Database.get_all_rows(sql)
def topFiveConnections(self): sql = "SELECT user, connections FROM stats ORDER BY connections DESC LIMIT 5" return Database.get_all_rows(sql)
def aboveUpLimit(self, limit): sql = "SELECT User FROM stats WHERE txs > %i" %(limit) return Database.get_all_rows(sql)