def add_comma_rs(_index, _value, _row_separator):
    """Adds a comma and row separator if index > 0, used in loops when making lists of references."""
    if _index > 0:
        return ',' + _row_separator + _value
    else:
        return _value

        # Some database functions