blob: d34c15f3459e2790f253f6e07e22b51c75ce425a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/perl
use strict;
use FS::UID qw(adminsuidsetup dbh);
use FS::Record; #buh?
my $user = shift or die 'usage';
adminsuidsetup $user;
while (1) {
my $sql = ' UPDATE h_cust_main SET paycvv = NULL
WHERE historynum IN ( SELECT historynum FROM h_cust_main
WHERE paycvv IS NOT NULL LIMIT 8192 )';
# WHERE paycvv IS NOT NULL LIMIT 1 )';
my $sth = dbh->prepare($sql) or die dbh->errstr;
print '.'; $|=1;
my $rv = $sth->execute;
dbh->commit or die dbh->errstr;
last if $rv == 0;
}
print "\n";
|