X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;f=bin%2Fimport_ward_data;h=ef6d62b4359b104970b9ec48a38956fb1706ea02;hb=f71b8f33d78f087691e594edf9ca5686c6eeb083;hp=bd707b4da75f149659a18d4c63a6acc20481d66a;hpb=82963f2191eff35b295440782e4309ea3632cf55;p=eq%2F.git diff --git a/bin/import_ward_data b/bin/import_ward_data index bd707b4..ef6d62b 100755 --- a/bin/import_ward_data +++ b/bin/import_ward_data @@ -2,13 +2,16 @@ use DBI; use Getopt::Std; + ################################################### # GLOBALS $dbname = "phpgroupware"; -$dbhost = "192.168.0.2"; +$dbhost = "192.168.0.2"; # This can be an IP address or name $dbport = 3306; -$dbuser = "phpgroupware"; -$dbpass = "phpgroupware"; +$dbuser = "phpgroupware"; # This may require an additional '\@localhost' +$dbpass = "phpgroupware"; +################################################### + %hometeaching_data = (); %membership_data = (); getopts('vsn:o:'); @@ -664,7 +667,7 @@ sub check_for_changed_ids ################################################### # Open a connection to the database -$dbh=DBI->connect("dbi:mysql:dbname=$dbname;host=$dbhost port=$dbport",$dbuser,$dbpass,{ +$dbh=DBI->connect("dbi:mysql:dbname=$dbname;host=$dbhost;port=$dbport",$dbuser,$dbpass,{ AutoCommit=>0, PrintError=>0}) or print "Connect Failure:".$DBI::errstr."\n" and exit 2; @@ -726,6 +729,8 @@ if($opt_s) { $dbh->disconnect(); exit; } &update_eq_parent_table(); &update_eq_child_table(); +print "\n-> Import Successful! DONE...\n"; + ################################################### # Disconnect from the database $dbh->disconnect(); @@ -733,13 +738,3 @@ $dbh->disconnect(); ###################################################################### - - - - - - - - - -