Use INSERT OR IGNORE instead of REPLACE

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2020-11-10 21:26:01 +01:00
parent 632addf41e
commit c8b85b8596

View File

@@ -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());
}