Changeset 672 in MondoRescue for trunk/tools/mkannounce.pl


Ignore:
Timestamp:
Jun 12, 2006, 9:55:14 AM (18 years ago)
Author:
bcornec
Message:

merge -r651:671 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/mkannounce.pl

    r652 r672  
    2828    }
    2929
    30 my $db="$TOOLHOME/../website/announces.sql";
     30my $db="$TOOLHOME/../website/announces3.sql";
    3131
    3232my $dbh = DBI->connect("dbi:SQLite:dbname=$db","","",
     
    4040open(ANNOUNCE,$ARGV[0]) || die "Unable to open $ARGV[0] (read)";
    4141my $announce = <ANNOUNCE>;
    42 $announce =~ s/\"/\"\"/g;
     42#$announce =~ s/\"/\"\"/g;
     43#$announce =~ s/!//g;
    4344close(ANNOUNCE);
    4445
    4546print "INSERT INTO announces VALUES (NULL, $date, $announce)\n";
    46 #$dbh->do("INSERT INTO announces VALUES (NULL, $date, $announce)")
     47my $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')))
    4751#|| die "Unable to insert into $db";
     52
    4853$dbh->disconnect;
Note: See TracChangeset for help on using the changeset viewer.