X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_commod;h=b37fa39001e25ec966f234e4ff84735c340c18b7;hb=202510fa47a7459760d6e41f6017500696e344d8;hp=c87b4400fdf9c8b690a274f9f5ce3242e53f9c32;hpb=017f4432a9bb472f61ab94c10b775e64d86ca391;p=ypp-sc-tools.db-live.git diff --git a/yarrg/web/query_commod b/yarrg/web/query_commod index c87b440..b37fa39 100644 --- a/yarrg/web/query_commod +++ b/yarrg/web/query_commod @@ -127,7 +127,12 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {

Offers to <% uc $bs |h %> <% $commodname |h %>

- +% $islands->execute($cmid); +% my $island; +% my %ts_sortkeys; +% my $rowix= 0; +% while ($island= $islands->fetchrow_hashref) { +% if (!$rowix) { -% $islands->execute($cmid); -% my $island; -% my %ts_sortkeys; -% my $rowix= 0; -% while ($island= $islands->fetchrow_hashref) { +% } % my $islandid= $island->{'islandid'}; % $offers->execute($cmid, $islandid); % my ($offer, $bestprice, $marginal, @beststalls); @@ -204,6 +205,7 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { % } % $rowix++; % } +% if ($rowix) {
@@ -143,11 +148,7 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { +/-10% Any
<&| tabsort, table => "${bs}_table", sortkeys => "${bs}_sortkeys", @@ -222,6 +224,9 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { return price; } +% } else { +No offers. +% } <%perl> }