removed indiv_id and sequence from tc_calling - redundant, unnecessary information
authorOwen Leonard <owen@balawis.leonard.fam>
Sat, 18 Sep 2010 03:57:05 +0000 (21:57 -0600)
committerOwen Leonard <owen@balawis.leonard.fam>
Sat, 18 Sep 2010 03:57:05 +0000 (21:57 -0600)
bin/import_ward_data
inc/class.tc.inc.php
sql/tc.sql

index b88cba81ccb6da2fe588d72f48d61086b2bbdbdd..52162dda2ebe75febea716a80074a987f5496a5e 100755 (executable)
@@ -104,7 +104,7 @@ sub print_hash
 
 ######################################################################
 
 
 ######################################################################
 
-# 3RD_INDIV
+# TC_INDIVIDUAL
 #+----------------------+------------------+------+-----+---------+----------------+
 #| Field                | Type             | Null | Key | Default | Extra          |
 #+----------------------+------------------+------+-----+---------+----------------+
 #+----------------------+------------------+------+-----+---------+----------------+
 #| Field                | Type             | Null | Key | Default | Extra          |
 #+----------------------+------------------+------+-----+---------+----------------+
@@ -194,15 +194,13 @@ sub update_tc_individual_table
        $sth->finish();
 }
 
        $sth->finish();
 }
 
-# 3RD_CALLING
+# TC_CALLING
 #+--------------+------------------+------+-----+---------+-------+
 #| Field        | Type             | Null | Key | Default | Extra |
 #+--------------+------------------+------+-----+---------+-------+
 #+--------------+------------------+------+-----+---------+-------+
 #| Field        | Type             | Null | Key | Default | Extra |
 #+--------------+------------------+------+-----+---------+-------+
-#| indiv_id     | int(16) unsigned | YES  |     | NULL    |       |
 #| name         | varchar(30)      | YES  |     | NULL    |       |
 #| organization | varchar(30)      | YES  |     | NULL    |       |
 #| position     | varchar(30)      | YES  |     | NULL    |       |
 #| name         | varchar(30)      | YES  |     | NULL    |       |
 #| organization | varchar(30)      | YES  |     | NULL    |       |
 #| position     | varchar(30)      | YES  |     | NULL    |       |
-#| sequence     | int(16) unsigned | YES  |     | NULL    |       |
 #| sustained    | date             | YES  |     | NULL    |       |
 #+--------------+------------------+------+-----+---------+-------+
 sub update_tc_calling_table()
 #| sustained    | date             | YES  |     | NULL    |       |
 #+--------------+------------------+------+-----+---------+-------+
 sub update_tc_calling_table()
@@ -219,24 +217,22 @@ sub update_tc_calling_table()
 
        foreach $index (keys %organization_data)
        {
 
        foreach $index (keys %organization_data)
        {
-               $indiv_id = $organization_data{$index}{'Indiv ID'};
                $name = $organization_data{$index}{'Indiv Name'};
                $name =~ s/\'/\\'/g; #'
                $organization = $organization_data{$index}{'Organization'};
                $organization_by_name{$name} = $organization;
                $organization_by_id{$indiv_id} = $organization;
                $position = $organization_data{$index}{'Position'};
                $name = $organization_data{$index}{'Indiv Name'};
                $name =~ s/\'/\\'/g; #'
                $organization = $organization_data{$index}{'Organization'};
                $organization_by_name{$name} = $organization;
                $organization_by_id{$indiv_id} = $organization;
                $position = $organization_data{$index}{'Position'};
-               $sequence = $organization_data{$index}{'Org Seq'};
                $sustained = $organization_data{$index}{'Sustained'};
                $sustained =~ /(\S+) (\d+)/; $month=$1; $year=$2;
                if($name eq "") { next; }
                print "   Adding new Calling: $name -> $position\n";
                $sustained = $organization_data{$index}{'Sustained'};
                $sustained =~ /(\S+) (\d+)/; $month=$1; $year=$2;
                if($name eq "") { next; }
                print "   Adding new Calling: $name -> $position\n";
-               $sth = $dbh->prepare("insert into tc_calling values ('$indiv_id','$name','$organization','$position','$sequence','$month $year')");
+               $sth = $dbh->prepare("insert into tc_calling values ('$name','$organization','$position','$month $year')");
                $sth->execute or die "-E- DB error: $DBI::errstr\n";
        }
 }
 
                $sth->execute or die "-E- DB error: $DBI::errstr\n";
        }
 }
 
-# 3RD_DISTRICT
+# TC_DISTRICT
 #+------------+------------------+------+-----+---------+-------+
 #| Field      | Type             | Null | Key | Default | Extra |
 #+------------+------------------+------+-----+---------+-------+
 #+------------+------------------+------+-----+---------+-------+
 #| Field      | Type             | Null | Key | Default | Extra |
 #+------------+------------------+------+-----+---------+-------+
@@ -267,7 +263,7 @@ sub update_tc_district_table
     $sth->finish();
 }
 
     $sth->finish();
 }
 
-# 3RD_COMPANIONSHIP
+# TC_COMPANIONSHIP
 #+----------------------+------------------+------+-----+---------+-------+
 #| Field                | Type             | Null | Key | Default | Extra |
 #+----------------------+------------------+------+-----+---------+-------+
 #+----------------------+------------------+------+-----+---------+-------+
 #| Field                | Type             | Null | Key | Default | Extra |
 #+----------------------+------------------+------+-----+---------+-------+
@@ -329,7 +325,7 @@ sub update_tc_companionship_table
        }
 }
 
        }
 }
 
-# 3RD_FAMILY
+# TC_FAMILY
 #+----------------------+------------------+------+-----+---------+-------+
 #| Field                | Type             | Null | Key | Default | Extra |
 #+----------------------+------------------+------+-----+---------+-------+
 #+----------------------+------------------+------+-----+---------+-------+
 #| Field                | Type             | Null | Key | Default | Extra |
 #+----------------------+------------------+------+-----+---------+-------+
@@ -427,7 +423,7 @@ sub update_tc_family_table
        }
 }
 
        }
 }
 
-# 3RD_VISIT
+# TC_VISIT
 #+----------------+------------------+------+-----+---------+-------+
 #| Field          | Type             | Null | Key | Default | Extra |
 #+----------------+------------------+------+-----+---------+-------+
 #+----------------+------------------+------+-----+---------+-------+
 #| Field          | Type             | Null | Key | Default | Extra |
 #+----------------+------------------+------+-----+---------+-------+
index 07c0b0e06e97ea6d00a60d641be19ebe2df4867c..ee67be5bd7df148928555b39907831adff17838a 100644 (file)
@@ -3503,7 +3503,6 @@ class tc
                $this->db->query($sql,__LINE__,__FILE__);
                $i=0;
                while ($this->db->next_record()) {
                $this->db->query($sql,__LINE__,__FILE__);
                $i=0;
                while ($this->db->next_record()) {
-                       $calling[$i]['id'] = $this->db->f('individual');
                        $calling[$i]['name'] = $this->db->f('name');
                        $calling[$i]['position'] = $this->db->f('position');
                        $calling[$i]['sustained'] = $this->db->f('sustained');
                        $calling[$i]['name'] = $this->db->f('name');
                        $calling[$i]['position'] = $this->db->f('position');
                        $calling[$i]['sustained'] = $this->db->f('sustained');
@@ -3525,11 +3524,10 @@ class tc
                }
 
                # Display a list ordered by organization
                }
 
                # Display a list ordered by organization
-               $sql = "SELECT * FROM tc_calling ORDER BY sequence ASC";
+               $sql = "SELECT * FROM tc_calling ORDER BY organization ASC";
                $this->db->query($sql,__LINE__,__FILE__);
                $i=0;
                while ($this->db->next_record()) {
                $this->db->query($sql,__LINE__,__FILE__);
                $i=0;
                while ($this->db->next_record()) {
-                       $calling[$i]['id'] = $this->db->f('individual');
                        $calling[$i]['name'] = $this->db->f('name');
                        $calling[$i]['position'] = $this->db->f('position');
                        $calling[$i]['sustained'] = $this->db->f('sustained');
                        $calling[$i]['name'] = $this->db->f('name');
                        $calling[$i]['position'] = $this->db->f('position');
                        $calling[$i]['sustained'] = $this->db->f('sustained');
index b10b60f4c63033d861c894a73255c02cef09995e..1a8cea30930375759c017c38382d1b554417eec1 100644 (file)
@@ -70,13 +70,10 @@ CREATE TABLE `tc_attendance` (
 -- Table structure for table `tc_calling`
 --
 CREATE TABLE `tc_calling` (
 -- Table structure for table `tc_calling`
 --
 CREATE TABLE `tc_calling` (
-  `indiv_id` int(16) unsigned default NULL,
   `name` varchar(30) default NULL,
   `organization` varchar(30) default NULL,
   `position` varchar(30) default NULL,
   `name` varchar(30) default NULL,
   `organization` varchar(30) default NULL,
   `position` varchar(30) default NULL,
-  `sequence` int(16) unsigned default NULL,
   `sustained` varchar(30) default NULL,
   `sustained` varchar(30) default NULL,
-  KEY `indiv_id` (`indiv_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
 --
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
 --