diff options
author | Marvin Borner | 2018-09-16 14:31:57 +0200 |
---|---|---|
committer | Marvin Borner | 2018-09-16 14:31:57 +0200 |
commit | 782c6c40271b74183a1b2f965835a427e3a6821e (patch) | |
tree | c4d72e3ac612d507490f8bbcbf25777162b47894 | |
parent | e76d7c4b15187563f5958a7275658e34c2fd0bee (diff) |
Fixed integrity constraint violation error :bug: :fire:
-rw-r--r-- | crawler.php | 2 |
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]);
}
|