Changeset 659 in MondoRescue for branches/stable/tools/mkannounce.pl
- Timestamp:
- Jun 9, 2006, 10:33:24 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/tools/mkannounce.pl
r651 r659 28 28 } 29 29 30 my $db="$TOOLHOME/../website/announces .sql";30 my $db="$TOOLHOME/../website/announces3.sql"; 31 31 32 32 my $dbh = DBI->connect("dbi:SQLite:dbname=$db","","", … … 40 40 open(ANNOUNCE,$ARGV[0]) || die "Unable to open $ARGV[0] (read)"; 41 41 my $announce = <ANNOUNCE>; 42 $announce =~ s/\"/\"\"/g; 42 #$announce =~ s/\"/\"\"/g; 43 #$announce =~ s/!//g; 43 44 close(ANNOUNCE); 44 45 45 46 print "INSERT INTO announces VALUES (NULL, $date, $announce)\n"; 46 #$dbh->do("INSERT INTO announces VALUES (NULL, $date, $announce)") 47 my $sth = $dbh->prepare(qq{INSERT INTO announces VALUES (NULL,?,?)}) 48 || die "Unable to insert into $db"; 49 $sth->execute($date, $announce); 50 #$dbh->do(qq(INSERT INTO announces VALUES (NULL, '$date', '$announce'))) 47 51 #|| die "Unable to insert into $db"; 52 48 53 $dbh->disconnect;
Note:
See TracChangeset
for help on using the changeset viewer.