#| 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 | |
$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";
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'};
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;
}
$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');
$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');
$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');
$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');
$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');
`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,
-- 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;
--
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`)
) 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,
`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;
--
-- 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;
--
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',
--
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,
`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;
--
-- 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;