  def self.parse_csv_row(row, book, idxs, user)

    imp_id = (idxs[0].nil? or row[idxs[0]].nil?)?(nil):(row[idxs[0]].strip)
    unless imp_id.nil? or imp_id.empty?
      org_address = Address.find_by_id(imp_id)
    end

    if org_address.nil?
      address = Address.new
    else
      address = org_address
    end

    address.id = imp_id
    attr_names = [
      :name,
      :name_ruby,
      :nickname,
      :screenname,
      :email1,
      :email2,
      :email3,
      :postalcode,
      :address,
      :tel1_note,
      :tel1,
      :tel2_note,
      :tel2,
      :tel3_note,
      :tel3,
      :fax,
      :url,
      :organization,
      :title,
      :memo,
      :xorder,
      :groups,
      :teams
    ]
    attr_names.each_with_index do |attr_name, idx|
      row_idx = idxs[idx+1]
      break if row_idx.nil?

      val = (row[row_idx].nil?)?(nil):(row[row_idx].strip)
      address.send(attr_name.to_s + '=', val)
    end
    if (address.groups == Address::EXP_IMP_FOR_ALL) \
        or (book == Address::BOOK_COMMON and address.groups.blank? and address.teams.blank?)
      address.groups = nil
      address.teams = nil
      address.owner_id = 0
    elsif !address.groups.blank? or !address.teams.blank?
      address.owner_id = 0
    else
      address.owner_id = user.id
    end

    return address
  end
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.