def table_get_link_order(column, order_key, order):
    """Get the correct order parameter value for the table heading link"""
    if column == order_key:
        # If the user is clicking on the column again, they want the
        # oposite order
        if order == "desc":
            return "asc"
        else:
            return "desc"
    else:
        # Default to descending
        return "desc"