summaryrefslogtreecommitdiff
path: root/httemplate/misc/states.cgi
blob: cff2c9774aa512525a216e4c7acb7648643e64c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<%

  my $country = $cgi->param('arg');

  my @states = 
     sort
     map { s/[\n\r]//g; $_; }
     map { $_->state; }
     qsearch( 'cust_main_county',
              { 'country' => $country },
              'DISTINCT ON ( state ) *',
            )
  ;


%>[ <%= join(', ', map { qq("$_") } @states) %> ]