X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2F477partVI_census.html;h=3883a1c0f3c886f909781d39f7659fd6ee453cda;hb=a7edb84851d2238c7ec449483f5bd34e40813ccd;hp=51baef76fd37dbb8937d915dd089910d3e3acc28;hpb=c6e4f9460f44a7440ef2fa7e67ed51dfe40a7668;p=freeside.git diff --git a/httemplate/search/477partVI_census.html b/httemplate/search/477partVI_census.html index 51baef76f..3883a1c0f 100755 --- a/httemplate/search/477partVI_census.html +++ b/httemplate/search/477partVI_census.html @@ -126,11 +126,13 @@ foreach my $row ( @row_option ) { my $count_query = 'SELECT count(*) FROM ( ('. join( ') UNION ALL (', - map { my $extra = $_->{extra_sql}; my $addl = $_->{addl_from}; - "SELECT censustract from cust_pkg $addl $extra"; - } - @sql_query - ). ') ) AS foo'; + map { my $addl_from = $_->{addl_from}; + my $extra_sql = $_->{extra_sql}; + my $order_by = $_->{order_by}; + "SELECT censustract from cust_pkg $addl_from $extra_sql $order_by"; + } + @sql_query + ). ') ) AS foo'; my $link = 'cust_pkg.cgi?'. join(';', map { my $key = $_;