- or download this
my $sql = "INSERT INTO ERRORS (TSTAMP,CMND_ID,ALERT_ID,SEND_ID,DESTIN
+ATION,MESSAGE,STATE,SVR_HOST) VALUES (\'$tstamp\',\'$cmnd_id\',\'$ale
+rt_id\',\'$send
...
or die "Couldn't prepare query '$sql': $DBI::errst
+r\n";
$statement->execute()
or die "Couldn't execute query '$sql': $DBI::errst
+r\n";
- or download this
my $sql = qq{"INSERT INTO ERRORS (TSTAMP,CMND_ID,ALERT_ID,SEND_ID,DEST
+INATION,MESSAGE,STATE,SVR_HOST) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);
my $statement = $dbh->prepare($sql);
$statement->execute($tstamp, $cmnd_id, ...);
- or download this
if($line =~ /^SendCleared~(.*)~(.*)~(.*)~(.*)~(.*)~(.*)/){
my $tstamp = $1;
...
my $send_id = $4;
my $state = $5;
my $svr_host = $6;
- or download this
my ($tstamp, $cmnd_id, ...) = split m/~/, $line;
- or download this
# assume %q contains the quries
my ($query, @args) = split $line, '~';
$q{$query}->execute(@args); # assuming the log files are well formed