Subversion Repositories VORC

Rev

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

#!/usr/bin/perl

use strict;
use cPanelUserConfig;
#use RollerCon;
use DBI;
use WebDB;

my $dbh = WebDB::connect ();

my $sth = $dbh->prepare ("update class set wrstbnd_id = ? where id = ?");

print "Adding WRSTBND Class IDs to VORC Classes...\n";
while (<>) {
        my ($id, $wbid) = split /,/, $_;
        $wbid =~ s/\s+//;
        print "Updating Class: $id with WRSTBND_ID: $wbid...";
        $sth->execute ($wbid, $id);
        warn "ERROR: $sth->errstr\n" unless !$sth->err;
        print "done.\n";
}

print "Done.\n";