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=3b2bf3554533f40a334d63690dac86f023b16764;hp=81e8208d1b34abd3fda1bb38e0181eb29949762c;hb=4a64ff96caa3eddb15ed84e09b6b5c8b7d614fc8;hpb=5d41f4f9fd6a3f188bba831a1a8902f7890cef8f diff --git a/yarrg/web/query_commod b/yarrg/web/query_commod index 81e8208..3b2bf35 100644 --- a/yarrg/web/query_commod +++ b/yarrg/web/query_commod @@ -57,34 +57,10 @@ my $qa= \%ARGS;
-%#---------- textbox, user enters route as string ---------- -% if (!$qa->{Dropdowns}) { - -Enter commodity (abbreviations are OK):
- -<&| qtextstring, qa => $qa, dbh => $dbh, - thingstring => 'commodstring', emsgstore => \$emsg, - onresults => sub { ($commodname,$cmid)= @{ $_[0] }; } +<& enter_commod, qa => $qa, dbh => $dbh, emsg_r => \$emsg, + commodname_r => \$commodname, + cmid_r => \$cmid &> - size=80 - - -% } else { #---------- dropdowns, user selects from menus ---------- - -% my $sth= $dbh->prepare("SELECT commodname,commodid FROM commods -% ORDER BY commodname"); -% $sth->execute(); -% my $row; - - -% } #---------- end of dropdowns, now common middle of page code ---------- % my $ours= sub { $_[0] =~ m/^commodstring|^commodid/; }; @@ -133,9 +109,14 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { % my $rowix= 0; % while ($island= $islands->fetchrow_hashref) { % if (!$rowix) { - +
++++ - @@ -194,11 +175,11 @@ foreach my $bs (split /_/, $ARGS{BuySell}) { % for my $cix (0..$#$s) { % $ts_sortkeys{$cix}{$rowid}= $s->[$cix];
+ + Prices Quantity at price
<% $s->[0]= $island->{'archipelago'} |h %> <% $s->[1]= $island->{'islandname'} |h %> <% $stallname |h %> - <% $s->[3]= (length $bestqty ? $bestprice : '-') %> - <% $s->[4]= $median %> - <% $s->[5]= $bestqty %> - <% $s->[6]= $approxqty %> - <% $s->[7]= $cqty %> + <% $s->[3]= (length $bestqty ? $bestprice : '-') %> + <% $s->[4]= $median %> + <% $s->[5]= $bestqty %> + <% $s->[6]= $approxqty %> + <% $s->[7]= $cqty %>