close DATA;
$dbh->do('DELETE FROM ratings');
-my $iq = $dbh->prepare('INSERT INTO ratings ( id, rating ) VALUES (?, ?)');
+my $iq = $dbh->prepare('INSERT INTO ratings ( id, rating, rating_stddev ) VALUES (?, ?, ?)');
open RATINGS, "$config::base_dir/bayeswf < $tmpnam |"
or die "bayeswf: $!";
while (<RATINGS>) {
- /(.*) (.*)/ or next;
- $iq->execute($2, $1);
+ /(.*) (.*) (.*)/ or next;
+ $iq->execute($3, $1, $2);
}
$dbh->commit;