($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
my %visit_status = ('X', 'y', '-', 'n', '', '');
+ $sth = $dbh->prepare("TRUNCATE TABLE tc_visit");
+ $sth->execute or die "-E- DB error: $DBI::errstr\n";
foreach $index (keys %hometeaching_stats_data)
{
$hashref = $hometeaching_stats_data{$index};
#print "$month_header\n";
#print $hometeaching_stats_data{$index}{$month_header};
#print "\n";
- foreach $i (reverse(0..$#history)) {
+ foreach $i (reverse(0..$#history-1)) {
# went back a calendar year, decrement $data_year
if ($months{$data_months[$i]} > $data_month)
{
foreach ($new_data as $entry) {
$visit_notes = $entry['notes'];
$family = $entry['family_id'];
- $visit_pri = $entry['pri'];
+ $visit_pri = $entry['pri'];
// Perform database save actions here
$this->db->query("SELECT * FROM tc_family WHERE family='$family'",__LINE__,__FILE__);
if ($this->db->next_record()) {