4 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
my $sth; if ($runner >= 15) { $sth = $dbh->prepare("DELETE FROM u5_psm WHERE galaxy=? AND system=?;"); $sth->execute($gal, $sys); foreach my $planet (sort {int $a <=> int $b} keys %sys) { $sth = $dbh->prepare("INSERT INTO u5_psm SET last_update=NOW(), planet='$planet', " . join(", ", map {$_."='".$sys{$planet}{$_}."'"} sort keys %{$sys{$planet}}) . ";"); $sth->execute(); print "INSERT INTO u5_psm SET planet='$planet', ". join(", ", map {$_."='".$sys{$planet}{$_}."'"} sort keys %{$sys{$planet}}) . ";"; } } return (scalar keys %sys > 0 ? 0 : 4); } sub translate { my $what = shift; if (defined($config{'TRANSLATE'}{$what})) { return $config{'TRANSLATE'}{$what}; } else { return $what; } }
print "DELETE FROM u5_psm WHERE galaxy=? AND system=?;";
4 Einträge, 1 Seite |