def query_total_active_conversations(): query = "SELECT count(*) as total FROM conversations WHERE status=1" result = fetchone_to_dict(query) #print result['total'] return result['total']
def query_total_users_online(): query = "SELECT count(*) as total FROM users where status<>'FLN'" result = fetchone_to_dict(query) return result['total']