def _sql_replace_parameters(query, replace_parameters):
    """
    This function get the query and replace all the values between backticks to the values in the replace_parameters
    list, the values are substituted using the order in replace parameters, for example, the `1` in the query will be
    substituted by the value replace_parameters[0] and so goes on.
    Example:
        query = "select * from database where x = `1` and z = `3` and y = `2`"
        replace_parameters = [30, 50, 60}

        returns = "select * from database where x = 30 and z = 60 and y = 50"

    :param query: Query to be changed
    :param replace_parameters: List that contains the values to be substitute
    :return: Query with the values changed
    """
    for replace in range(len(replace_parameters)):
        query = query.replace('`' + str(replace + 1) + '`', '"' + str(
            replace_parameters[replace]) + '"')
    return query
