From c8b85b85960025e2ba7710e1a365884db311773b Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 10 Nov 2020 21:26:01 +0100 Subject: [PATCH] Use INSERT OR IGNORE instead of REPLACE Signed-off-by: DL6ER --- scripts/pi-hole/php/groups.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/php/groups.php b/scripts/pi-hole/php/groups.php index ba9843ca..ab6abc82 100644 --- a/scripts/pi-hole/php/groups.php +++ b/scripts/pi-hole/php/groups.php @@ -506,7 +506,7 @@ if ($_POST['action'] == 'get_groups') { $added = 0; // Prepare INSERT INTO statement - $insert_stmt = $db->prepare('REPLACE INTO domainlist (domain,type) VALUES (:domain,:type)'); + $insert_stmt = $db->prepare('INSERT OR IGNORE INTO domainlist (domain,type) VALUES (:domain,:type)'); if (!$insert_stmt) { throw new Exception('While preparing statement: ' . $db->lastErrorMsg()); }