  def self.get_for(mail_account_id, enabled=nil, trigger=nil)

    return [] if mail_account_id.nil?

    SqlHelper.validate_token([mail_account_id, trigger])

    con = []
    con << "(mail_account_id=#{mail_account_id})"
    con << "(enabled=#{(enabled)?(1):(0)})" unless enabled.nil?
    con << SqlHelper.get_sql_like([:triggers], "|#{trigger}|") unless trigger.nil?

    return MailFilter.where(con.join(' and ')).order('(xorder is null) ASC, xorder ASC, id ASC').to_a
  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.