From 782c6c40271b74183a1b2f965835a427e3a6821e Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 16 Sep 2018 14:31:57 +0200 Subject: Fixed integrity constraint violation error :bug: :fire: --- crawler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); } -- cgit v1.2.3