Subversion Repositories VORC

Rev

Rev 173 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
173 - 1
#!/usr/bin/perl
2
 
3
use strict;
4
use cPanelUserConfig;
5
#use RollerCon;
6
use DBI;
7
use WebDB;
8
 
9
my $dbh = WebDB::connect ();
10
 
11
my $sth = $dbh->prepare ("update class set wrstbnd_id = ? where id = ?");
12
 
13
print "Adding WRSTBND Class IDs to VORC Classes...\n";
14
while (<>) {
15
	my ($id, $wbid) = split /,/, $_;
16
	$wbid =~ s/\s+//;
17
	print "Updating Class: $id with WRSTBND_ID: $wbid...";
174 - 18
	$sth->execute ($wbid, $id);
173 - 19
	warn "ERROR: $sth->errstr\n" unless !$sth->err;
20
	print "done.\n";
21
}
22
 
23
print "Done.\n";