From: Owen Leonard Date: Fri, 17 Sep 2010 06:38:56 +0000 (-0600) Subject: changed mls_indiv_id to mls_id X-Git-Tag: release_1_0_0~35 X-Git-Url: http://git.pippins.net/embedvideo/.git/static/%27%20%20%20%20.%20%24GLOBALS%5B%27phpgw%27%5D-%3Elink%28%27inc/jquery/%7Blink_ppi%7D?a=commitdiff_plain;h=e9ca9544dc03c8e3e554c619d1a5dcf8599cb65a;p=eq%2F.git changed mls_indiv_id to mls_id --- diff --git a/bin/import_ward_data b/bin/import_ward_data index f2fa90b..560650a 100755 --- a/bin/import_ward_data +++ b/bin/import_ward_data @@ -109,7 +109,7 @@ sub print_hash #| Field | Type | Null | Key | Default | Extra | #+-------------+------------------+------+-----+---------+----------------+ #| individual | int(16) unsigned | | PRI | NULL | auto_increment | -#| mls_indiv_id| int(16) unsigned | | | NULL | | +#| mls_id | int(16) unsigned | | | NULL | | #| name | varchar(60) | YES | | NULL | | #| phone | varchar(12) | YES | | NULL | | #| email | varchar(120) | YES | | NULL | | @@ -181,7 +181,7 @@ sub update_tc_individual_table $sth->execute or die "-E- DB error: $DBI::errstr\n"; $sth = $dbh->prepare("update tc_individual set attending='$attending' where name=\"$individual_name\""); $sth->execute or die "-E- DB error: $DBI::errstr\n"; - $sth = $dbh->prepare("update tc_individual set mls_indiv_id='$id' where name=\"$individual_name\""); + $sth = $dbh->prepare("update tc_individual set mls_id='$id' where name=\"$individual_name\""); $sth->execute or die "-E- DB error: $DBI::errstr\n"; $sth = $dbh->prepare("update tc_individual set priesthood='$priesthood' where name=\"$individual_name\""); $sth->execute or die "-E- DB error: $DBI::errstr\n"; @@ -546,7 +546,7 @@ sub check_for_changed_ids foreach $oldindex (keys %$oldhashref) { - $mls_indiv_id = $oldhashref->{$oldindex}{'Indiv ID'}; + $mls_id = $oldhashref->{$oldindex}{'Indiv ID'}; $hofh_id = $oldhashref->{$oldindex}{'HofH ID'}; $full_name = $oldhashref->{$oldindex}{'Full Name'}; $hh_position = $oldhashref->{$oldindex}{'HH Position'}; @@ -555,9 +555,9 @@ sub check_for_changed_ids foreach $newindex (keys %$newhashref) { if($newhashref->{$newindex}{'Full Name'} eq $full_name && - $mls_indiv_id != $newhashref->{$newindex}{'Indiv ID'}) + $mls_id != $newhashref->{$newindex}{'Indiv ID'}) { - print "-W- Indiv ID for $full_name changed from $mls_indiv_id to $newhashref->{$newindex}{'Indiv ID'}\n"; + print "-W- Indiv ID for $full_name changed from $mls_id to $newhashref->{$newindex}{'Indiv ID'}\n"; $found_problem = 1; } diff --git a/inc/class.tc.inc.php b/inc/class.tc.inc.php index 49d9a49..cf456d0 100644 --- a/inc/class.tc.inc.php +++ b/inc/class.tc.inc.php @@ -1367,9 +1367,9 @@ class tc $sql = "SELECT * FROM tc_individual where individual='$president_id'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { - $mls_indiv_id = $this->db2->f('mls_indiv_id'); + $mls_id = $this->db2->f('mls_id'); } - $sql = "SELECT * FROM tc_individual where mls_indiv_id='$mls_indiv_id'"; + $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { $president_address = $this->db2->f('address'); @@ -1720,9 +1720,9 @@ class tc $sql = "SELECT * FROM tc_individual where individual='$supervisor'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { - $mls_indiv_id = $this->db2->f('mls_indiv_id'); + $mls_id = $this->db2->f('mls_id'); } - $sql = "SELECT * FROM tc_individual where mls_indiv_id='$mls_indiv_id'"; + $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { $supervisor_address = $this->db2->f('address'); @@ -1806,9 +1806,9 @@ class tc $sql = "SELECT * FROM tc_individual where individual='$supervisor'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { - $mls_indiv_id = $this->db2->f('mls_indiv_id'); + $mls_id = $this->db2->f('mls_id'); } - $sql = "SELECT * FROM tc_individual where mls_indiv_id='$mls_indiv_id'"; + $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { $supervisor_address = $this->db2->f('address'); @@ -3629,9 +3629,9 @@ class tc $sql = "SELECT * FROM tc_individual where individual='$presidency2indiv[$presidency]'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { - $mls_indiv_id = $this->db2->f('mls_indiv_id'); + $mls_id = $this->db2->f('mls_id'); } - $sql = "SELECT * FROM tc_individual where mls_indiv_id='$mls_indiv_id'"; + $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { $supervisor_address = $this->db2->f('address'); @@ -3754,9 +3754,9 @@ class tc $sql = "SELECT * FROM tc_individual where individual='$presidency2indiv[$presidency]'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { - $mls_indiv_id = $this->db2->f('mls_indiv_id'); + $mls_id = $this->db2->f('mls_id'); } - $sql = "SELECT * FROM tc_individual where mls_indiv_id='$mls_indiv_id'"; + $sql = "SELECT * FROM tc_individual where mls_id='$mls_id'"; $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { $supervisor_address = $this->db2->f('address'); diff --git a/sql/tc.sql b/sql/tc.sql index 1552367..79cd0a0 100644 --- a/sql/tc.sql +++ b/sql/tc.sql @@ -30,7 +30,7 @@ CREATE TABLE `tc_appointment` ( `appointment` int(16) unsigned NOT NULL auto_increment, `presidency` int(16) unsigned NOT NULL default '0', `family` int(16) unsigned default '0', - `indiv` int(16) unsigned default '0', + `individual` int(16) unsigned default '0', `date` date NOT NULL default '0000-00-00', `time` time NOT NULL default '00:00:00', `location` varchar(120) default NULL, @@ -61,9 +61,9 @@ UNLOCK TABLES; -- Table structure for table `tc_attendance` -- CREATE TABLE `tc_attendance` ( - `indiv` int(16) unsigned NOT NULL default '0', + `individual` int(16) unsigned NOT NULL default '0', `date` date default NULL, - KEY `indiv` (`indiv`) + KEY `individual` (`individual`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- @@ -85,7 +85,7 @@ CREATE TABLE `tc_calling` ( CREATE TABLE `tc_companionship` ( `companionship` int(16) unsigned NOT NULL default '0', - `indiv` int(16) unsigned NOT NULL default '0', + `individual` int(16) unsigned NOT NULL default '0', `district` int(16) unsigned default NULL, `valid` tinyint(1) default NULL, KEY `companionship` (`companionship`) @@ -103,11 +103,11 @@ CREATE TABLE `tc_district` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- --- Table structure for table `tc_indiv` +-- Table structure for table `tc_individual` -- CREATE TABLE `tc_individual` ( `individual` int(16) unsigned NOT NULL auto_increment, - `mls_indiv_id` int(16) unsigned NOT NULL, + `mls_id` int(16) unsigned NOT NULL, `name` varchar(60) default NULL, `address` varchar(255) default NULL, `phone` varchar(12) default NULL, @@ -122,7 +122,7 @@ CREATE TABLE `tc_individual` ( `hti_notes` varchar(128) default NULL, `attending` tinyint(1) default '0', `valid` tinyint(1) default NULL, - PRIMARY KEY (`indiv`) + PRIMARY KEY (`individual`) ) ENGINE=MyISAM AUTO_INCREMENT=105 DEFAULT CHARSET=latin1; -- @@ -145,9 +145,9 @@ CREATE TABLE `tc_family` ( -- Table structure for table `tc_participation` -- CREATE TABLE `tc_participation` ( - `indiv` int(16) unsigned NOT NULL default '0', + `individual` int(16) unsigned NOT NULL default '0', `activity` int(16) unsigned default NULL, - UNIQUE KEY `activity_ndx` (`indiv`,`activity`) + UNIQUE KEY `activity_ndx` (`individual`,`activity`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- @@ -156,7 +156,7 @@ CREATE TABLE `tc_participation` ( CREATE TABLE `tc_interview` ( `interview` int(16) unsigned NOT NULL auto_increment, `interviewer` int(16) unsigned default NULL, - `indiv` int(16) unsigned default NULL, + `individual` int(16) unsigned default NULL, `date` date default NULL, `notes` text, `interview_type` enum('hti','ppi') NOT NULL DEFAULT 'hti', @@ -169,7 +169,7 @@ CREATE TABLE `tc_interview` ( -- CREATE TABLE `tc_presidency` ( `presidency` int(16) unsigned NOT NULL auto_increment, - `indiv` int(16) unsigned NOT NULL default '0', + `individual` int(16) unsigned NOT NULL default '0', `district` int(16) unsigned default '0', `name` varchar(60) NOT NULL, `email` varchar(60) NOT NULL, @@ -178,7 +178,7 @@ CREATE TABLE `tc_presidency` ( `secretary` tinyint(1) default '0', `valid` tinyint(1) default '1', KEY `presidency` (`presidency`), - KEY `indiv` (`indiv`) + KEY `individual` (`individual`) ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; -- @@ -201,8 +201,8 @@ CREATE TABLE `tc_visit` ( -- Table structure for table `tc_willingness` -- CREATE TABLE `tc_willingness` ( - `indiv` int(16) unsigned NOT NULL, + `individual` int(16) unsigned NOT NULL, `assignment` int(16) unsigned NOT NULL, `willing` enum('y','n','') NOT NULL, - KEY `indiv` (`indiv`,`assignment`) + KEY `individual` (`individual`,`assignment`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;