Added default values for interview_pri and visit_pri and changed the default value...
authorAlan Pippin <apippin@pippins.net>
Mon, 13 Sep 2010 18:32:32 +0000 (12:32 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Mon, 13 Sep 2010 18:32:32 +0000 (12:32 -0600)
bin/import_ward_data
setup/db_config

index 7e8b7ac4787b49bd9ab57ab6122e638c37086b44..fe2cf3ed31ec2d42234d6b4cd165211b39010607 100755 (executable)
@@ -160,7 +160,7 @@ sub update_tc_indiv_table
        if($rows == 0) {
            # No existing records found for this indiv, make a new entry
            print "   Adding new indiv: $indiv_name\n";
-           $sth = $dbh->prepare("insert into tc_indiv values (NULL,'$id',\"$indiv_name\",'$year-$month-$day','$address','$phone','$email','','$hhposition','$priesthood','','1','','1','',$attending,1)");
+           $sth = $dbh->prepare("insert into tc_indiv values (NULL,'$id',\"$indiv_name\",'$year-$month-$day','$address','$phone','$email','','$hhposition','$priesthood','','$default_interview_pri','','$default_interview_pri','',$attending,1)");
            $sth->execute or die "-E- DB error: $DBI::errstr\n";
        } elsif($rows == 1) {
            # An existing record was found for this indiv, update it
@@ -381,7 +381,7 @@ sub update_tc_family_table
                if($rows == 0) {
                    # No existing records found for this family, make a new entry
                    print "   Adding new Family: $family_name\n";
-                   $sth = $dbh->prepare("insert into tc_family values (NULL,$id,'$family_name','$name_id','0','0','1','',1)");
+                   $sth = $dbh->prepare("insert into tc_family values (NULL,$id,'$family_name','$name_id','0','0','$default_visit_pri','',1)");
                    $sth->execute or die "-E- DB error: $DBI::errstr\n";
                } elsif($rows == 1) {
                    # An existing record was found for this family, update it
index 9cef5a4ea27eb45bd5fed1d96c731703abae7b1a..0036f13cf3d8d90f02e3713472d8c751e24d41a5 100644 (file)
@@ -10,5 +10,7 @@ $dbhost = "192.168.0.4"; # This can be an IP address or name
 $dbport = 3306;
 $dbuser = "phpgroupware"; # This may require an additional '\@localhost'
 $dbpass = "phpgroupware";
-$areacode = "970";
 
+$areacode = "970";
+$default_visit_pri = 30;
+$default_interview_pri = 30;