Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (15 sloc) 576 Bytes
#!/usr/bin/perl
use strict;
use DBI;
use FindBin;
use lib "$FindBin::Bin/../commonlib/perllib";
use mySociety::Config;
mySociety::Config::set_file('../conf/general');
my $dsn = 'DBI:mysql:database=' . mySociety::Config::get('TWFY_DB_NAME'). ':host=' . mySociety::Config::get('TWFY_DB_HOST');
my $dbh = DBI->connect($dsn, mySociety::Config::get('TWFY_DB_USER'), mySociety::Config::get('TWFY_DB_PASS'), { RaiseError => 1, PrintError => 0 });
my $q = $dbh->prepare('update alerts set deleted=1 where email=?');
while (<>) {
chomp;
my $r = $q->execute($_);
print "$r\n";
}
Something went wrong with that request. Please try again.