X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;ds=sidebyside;f=yarrg%2Fweb%2Fpirates;h=158239dd5a7a98cbcb57088f0b1cb7a8601e23a3;hb=a9583fa8a29e889f435ee4d6cf3dc6a5979a6bd5;hp=5378cf44637bf487f17b4118381b1695f59675cc;hpb=3793840cd03da4b9bf470ec36bcf1acacb536a49;p=ypp-sc-tools.db-test.git diff --git a/yarrg/web/pirates b/yarrg/web/pirates index 5378cf4..158239d 100644 --- 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,9 @@ $sth->execute(); + +<%init> +use CommodsWeb; +db_setocean('Midnight'); +db_connect(); +