6 Einträge, 1 Seite |
1
2
3
4
5
my $Q="INSERT INTO logs VALUES (\" \", \"$typ\", \"$time\", \"$date\", \"$severity\", \"$action\",\"$ip\", \"$line\")";
my $sth=$dbh->prepare($Q)||die "Cant prepare statement: $DBI::errstr";
my $rv=$sth->execute() || die "Can't execute statement: $DBI::errstr";
1
2
3
4
5
my $Q="INSERT INTO logs VALUES ('', ?, ?, ?, ?, ?, ?, ?)";
my $sth=$dbh->prepare($Q)||die "Cant prepare statement: $DBI::errstr";
my $rv=$sth->execute($typ,$time,$date,$severity,$action,$ip,$line) || die "Can't execute statement: $DBI::errstr";
1
2
3
4
5
use SQL::Interpolate qw(sql_interp);
my($sql, @bind) = sql_interp q{INSERT INTO logs},
["", $typ, $time, $date, $severity, $action, $ip, $line];
$dbh->prepare($sql);
$dbh->execute(@bind);
6 Einträge, 1 Seite |