Select island
my $sth=$dbh->prepare(
"SELECT a.commodname,b.price,c.price,d.stallname,e.islandname
FROM commods as a
JOIN buy as b on a.commodid=b.commodid
JOIN buy as c on a.commodid=c.commodid
JOIN stalls as d on d.stallid=b.stallid
JOIN islands as e on e.islandid=d.islandid
WHERE a.commodname like 'Wood'
");
$sth->execute();
%perl>
% my @row;
% while (@row=$sth->fetchrow_array) {
% foreach my $cell (@row) {
<% $cell %>
|
% }
% }
<%init>
use CommodsWeb;
db_setocean('Midnight');
db_connect();
%init>