if ($range eq "old") { $addressField = "oldAddressSort"; $streetField = "oldAddress"; } else { $addressField = "newAddressSort"; $streetField = "newAddress"; } # Allows the user to switch back and forth between old address (pre-1907) and new address (post-address) $queryaddress = "SELECT * FROM `addressMaster` WHERE $addressField = '$address' AND $streetField = '$street'"; my $sth = $dbh->prepare($queryaddress); $sth->execute(); ($oldStreetNumber,$newStreetNumber,$oldAddress,$newAddress,$oldAddressSort,$newAddressSort,$uida) = $sth->fetchrow(); # The above code simply finds the old and new street numbers and names for the indicated property if ($oldStreetNumber eq "") { $addressText = "No records found for this property."; $oldAddress = $street; $oldStreetNumber = $address; } else { $addressText = "Before 1907, this property was at $oldStreetNumber $oldAddress. It is now $newStreetNumber $newAddress." } $imageFileName = $newAddressSort . $newAddress; $imageFileName =~ tr/ //d; $imageFileName = $imageFileName . ".jpg"; $imageFileName =~ tr/A-Z/a-z/; # If we have a photo of the property from the 2000 AIC project, this will determine its name for subsequent display $query = "SELECT recordID FROM houseDocumentation WHERE address='$newStreetNumber' AND street='$newAddress'"; my $sth = $dbh->prepare($query); $sth->execute(); $xmlFile = $sth->fetchrow(); $sth->finish(); $housingSurveyStr = ""; if ($xmlFile) { $housingSurveyStr = "2000 Survey" } # If we have a 2000 AIC survey for the property, then build a link to a CGI program that will display it # I am skipping some code here, which simply builds up the headers to create a dynamic web page # Now iterate through the 4 data sources for demographic data (1883 and 1889 city directories, 1900 census, and 1916 phone book