X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_commod;h=34b1347f20f5034315a1821d535cd6de40f8f8e2;hp=0bd36cbffa4db9e958ce30cbc84521a181e70862;hb=f6d7a4d627f3ecc0624649bb895dbf8e59afcf47;hpb=2007f48bd68be9218b8f41acd9ba32d378a1b22c diff --git a/yarrg/web/query_commod b/yarrg/web/query_commod index 0bd36cb..34b1347 100644 --- a/yarrg/web/query_commod +++ b/yarrg/web/query_commod @@ -103,7 +103,7 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { sum(qty) as tqty FROM islands $joinkind $bs offers ON islands.islandid == offers.islandid AND commodid == ? - GROUP BY islands.islandid, + GROUP BY islands.islandid ORDER BY archipelago, islandname" ); @@ -137,6 +137,7 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { % $islands->execute($commodid); % my $island; % my %ts_sortkeys; +% my $rowix= 0; % while ($island= $islands->fetchrow_hashref) { % my $islandid= $island->{'islandid'}; % $offers->execute($commodid, $islandid); @@ -179,7 +180,7 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { % } % % $cqty == $tqty or die "$bs $cqty $tqty $commodid $islandid "; - > + class="<% 'datarow'.($rowix & 1) %>"> <% $s->[0]= $island->{'archipelago'} |h %> <% $s->[1]= $island->{'islandname'} |h %> <% $stallname |h %> @@ -192,11 +193,12 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { % for my $cix (0..$#$s) { % $ts_sortkeys{$cix}{$rowid}= $s->[$cix]; % } +% $rowix++; % } <& tabsort, table => "${bs}_table", sortkeys => "${bs}_sortkeys", - throw => "${bs}_table_thr", cols => [ + throw => "${bs}_table_thr", rowclass => 'datarow', cols => [ {}, {}, { DoReverse => 1 }, { DoReverse => 1, Numeric => 1, MapFn => "ts_Pricemap_${bs}" },