From: Owen Leonard Date: Sat, 18 Sep 2010 03:57:05 +0000 (-0600) Subject: removed indiv_id and sequence from tc_calling - redundant, unnecessary information X-Git-Tag: release_1_0_0~31 X-Git-Url: http://git.pippins.net/embedvideo/.git/%27%20.%20%24this-%3Ephpgw_js_url%20.%20%27/jscalendar/%7Badd%7D?a=commitdiff_plain;h=c4661380990db4b88dceb39dd28bd63c4d793ade;p=eq%2F.git removed indiv_id and sequence from tc_calling - redundant, unnecessary information --- diff --git a/bin/import_ward_data b/bin/import_ward_data index b88cba8..52162dd 100755 --- a/bin/import_ward_data +++ b/bin/import_ward_data @@ -104,7 +104,7 @@ sub print_hash ###################################################################### -# 3RD_INDIV +# TC_INDIVIDUAL #+----------------------+------------------+------+-----+---------+----------------+ #| Field | Type | Null | Key | Default | Extra | #+----------------------+------------------+------+-----+---------+----------------+ @@ -194,15 +194,13 @@ sub update_tc_individual_table $sth->finish(); } -# 3RD_CALLING +# TC_CALLING #+--------------+------------------+------+-----+---------+-------+ #| 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 | | -#| sequence | int(16) unsigned | YES | | NULL | | #| sustained | date | YES | | NULL | | #+--------------+------------------+------+-----+---------+-------+ sub update_tc_calling_table() @@ -219,24 +217,22 @@ sub update_tc_calling_table() 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'}; - $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"; - $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"; } } -# 3RD_DISTRICT +# TC_DISTRICT #+------------+------------------+------+-----+---------+-------+ #| Field | Type | Null | Key | Default | Extra | #+------------+------------------+------+-----+---------+-------+ @@ -267,7 +263,7 @@ sub update_tc_district_table $sth->finish(); } -# 3RD_COMPANIONSHIP +# TC_COMPANIONSHIP #+----------------------+------------------+------+-----+---------+-------+ #| 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 | #+----------------------+------------------+------+-----+---------+-------+ @@ -427,7 +423,7 @@ sub update_tc_family_table } } -# 3RD_VISIT +# TC_VISIT #+----------------+------------------+------+-----+---------+-------+ #| Field | Type | Null | Key | Default | Extra | #+----------------+------------------+------+-----+---------+-------+ diff --git a/inc/class.tc.inc.php b/inc/class.tc.inc.php index 07c0b0e..ee67be5 100644 --- a/inc/class.tc.inc.php +++ b/inc/class.tc.inc.php @@ -3503,7 +3503,6 @@ class tc $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'); @@ -3525,11 +3524,10 @@ class tc } # 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()) { - $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'); diff --git a/sql/tc.sql b/sql/tc.sql index b10b60f..1a8cea3 100644 --- a/sql/tc.sql +++ b/sql/tc.sql @@ -70,13 +70,10 @@ CREATE TABLE `tc_attendance` ( -- 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, - `sequence` int(16) unsigned default NULL, `sustained` varchar(30) default NULL, - KEY `indiv_id` (`indiv_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; --