Skip to content

Commit

Permalink
Always save record as planningalerts now does versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed May 6, 2019
1 parent 910673a commit e70289b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scraper.php
Expand Up @@ -68,12 +68,7 @@
];

# Check if record exist, if not, INSERT, else do nothing
$existingRecords = scraperwiki::select("* from data where `council_reference`='" . $record['council_reference'] . "'");
if (count($existingRecords) == 0) {
print ("Saving record " .$record['council_reference']. " - " .$record['address']. "\n");
print ("Saving record " .$record['council_reference']. " - " .$record['address']. "\n");
// print_r ($record);
scraperwiki::save(['council_reference'], $record);
} else {
print ("Skipping already saved record " . $record['council_reference'] . "\n");
}
scraperwiki::save(['council_reference'], $record);
}

0 comments on commit e70289b

Please sign in to comment.