use POSIX;
use lib qw( include );
require 'config.pm';
+require 'common.pm';
# Find last completely done season
sub find_last_season {
close RATINGS;
}
-sub find_all_locales {
- my $dbh = shift;
- my $q = $dbh->prepare('SELECT kultur FROM fotballspraak WHERE nyestesesong<>-1');
- $q->execute;
-
- my @locales = ();
- while (my $ref = $q->fetchrow_hashref) {
- push @locales, $ref->{'kultur'};
- }
-
- return @locales;
-}
-
my $dbh = DBI->connect($config::local_connstr, $config::local_username, $config::local_password)
or die "connect: " . $DBI::errstr;
$dbh->{AutoCommit} = 0;
$dbh->do('SET client_min_messages TO WARNING');
-my @locales = find_all_locales($dbh);
+my @locales = wloh_common::find_all_locales($dbh);
my @ratings = ();
my @covariances = ();