mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Use INSERT OR IGNORE instead of REPLACE
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user