Numerous bug fixes from Brett's turn-on experience.
[eq/.git] / bin / import_ward_data
index bd707b4da75f149659a18d4c63a6acc20481d66a..ef6d62b4359b104970b9ec48a38956fb1706ea02 100755 (executable)
@@ -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();
 ######################################################################
 
 
-
-
-
-
-
-
-
-
-
-