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%2Fpirates;h=6a3c47889fead82686fa712bb4091c19612b7209;hp=5378cf44637bf487f17b4118381b1695f59675cc;hb=c5b3ac45babf8012719dfb7eafd0cfa9d9eddff0;hpb=3793840cd03da4b9bf470ec36bcf1acacb536a49 diff --git a/yarrg/web/pirates b/yarrg/web/pirates old mode 100644 new mode 100755 index 5378cf4..6a3c478 --- a/yarrg/web/pirates +++ b/yarrg/web/pirates @@ -21,19 +21,6 @@ $sth->execute(); - -use DBI; - -our $dbh; -our $dbfn; -$dbfn= "/home/ijackson/things/ypp-sc-tools.pctb-dict-test/yarrg/OCEAN-Midnight.db"; - $dbh=DBI->connect("dbi:SQLite:$dbfn",'','', - { AutoCommit=>0, - RaiseError=>1, ShowErrorStatement=>1, - unicode=>1 }) - or die "$dbfn $DBI::errstr ?"; - # default timeout is 30s which is plenty - my $sth=$dbh->prepare( "SELECT a.commodname,b.price,c.price,d.stallname,e.islandname FROM commods as a @@ -64,3 +51,8 @@ $sth->execute(); + +<%init> +use CommodsWeb; +my $dbh= dbw_connect('Midnight'); +