def checkExists(cursor, user):
    """Checks if a user is present in the table"""

    command = "SELECT EXISTS(SELECT 1 FROM leaderboard WHERE username = %s)"
    cursor.execute(command, (user,))

    # The function returns a tuple
    return cursor.fetchone()[0]