[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS Update: fgo.ca



Log Message:
-----------
Bring in plot number for appendix 4.  Needed to find a unique key.

Modified Files:
--------------
    fgo.ca/public_html:
        butternut.pl

Revision Data
-------------
Index: butternut.pl
===================================================================
RCS file: /cvs/fgo.ca/public_html/butternut.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lpublic_html/butternut.pl -Lpublic_html/butternut.pl -u -r1.9 -r1.10
--- public_html/butternut.pl
+++ public_html/butternut.pl
@@ -430,6 +430,11 @@
 						$data = tabparse($tmp, $tab{$type});
 						if ($type eq 'appendix4')
 							{
+								my $plot = $member->fileName();
+								$plot =~ s/-.*//;
+								$plot =~ s/^p//;
+								$data = [ map { {%{$_}, plotno => $plot} } @{$data} ];
+
 								my $SQL = <<EOT;
 insert into bnut_appendix4 ( "treebearing1", "treebearing2", "treebearing3", "treedistance1", "treedistance2", "treedistance3",
   "tree", "UTM1", "UTM2", "easting1", "easting2", "easting3", "easting4", "easting5", "easting6",
@@ -438,9 +443,9 @@
   "root-oozing", "root-perenneal", "root-callus", "under-oozing", "under-perenneal", "under-callus",
   "over-oozing", "over-perenneal", "over-callus", "crown-young", "crown-oozing", "crown-perenneal", "crown-callus",
   "healthy", "cankerno", "girdling", "eipcormic-stump", "epicormic-stem", "epicormic-crown", "bark",
-  "pests-P1", "pests-L1", "pests-P2", "pests-L2", remarks)
+  "pests-P1", "pests-L1", "pests-P2", "pests-L2", remarks, plotno)
 values
-(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
 EOT
 
 								my $cursor = $dbh->prepare($SQL);
@@ -453,7 +458,7 @@
  root-oozing root-perenneal root-callus under-oozing under-perenneal under-callus
  over-oozing over-perenneal over-callus crown-young crown-oozing crown-perenneal crown-callus
  healthy cankerno girdling eipcormic-stump epicormic-stem epicormic-crown bark
- pests-P1 pests-L1 pests-P2 pests-L2 remarks));
+ pests-P1 pests-L1 pests-P2 pests-L2 remarks plotno));
 
 										push @errors, {message => $member->fileName().": ".$dbh->errstr} if $dbh->errstr;
 									};


Main Menu:

Site Tools:


Here, spammer, have some addresses.