summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2018-09-16 14:31:57 +0200
committerMarvin Borner2018-09-16 14:31:57 +0200
commit782c6c40271b74183a1b2f965835a427e3a6821e (patch)
treec4d72e3ac612d507490f8bbcbf25777162b47894
parente76d7c4b15187563f5958a7275658e34c2fd0bee (diff)
Fixed integrity constraint violation error :bug: :fire:
-rw-r--r--crawler.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawler.php b/crawler.php
index 45753f3..f1c37cc 100644
--- a/crawler.php
+++ b/crawler.php
@@ -197,7 +197,7 @@ function urlHasError($url)
$hash = md5($url);
$conn = initDbConnection();
- $checkStmt = $conn->prepare('INSERT INTO error_url (url, hash) VALUES (:url, :hash)');
+ $checkStmt = $conn->prepare('INSERT IGNORE INTO error_url (url, hash) VALUES (:url, :hash)');
$checkStmt->execute([':url' => $url, 'hash' => $hash]);
}