Updated insert label query

Updated insert label query
This commit is contained in:
cp6 2022-02-20 16:39:52 +11:00
parent c892295de7
commit 345d50b8ae
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class DomainsController extends Controller
for ($i = 1; $i <= 4; $i++) {
if (!is_null($labels_array[($i - 1)])) {
DB::insert('INSERT INTO labels_assigned (label_id, service_id) values (?, ?)', [$labels_array[($i - 1)], $domain_id]);
DB::insert('INSERT IGNORE INTO labels_assigned (label_id, service_id) values (?, ?)', [$labels_array[($i - 1)], $domain_id]);
}
}

View File

@ -128,7 +128,7 @@ class ServerController extends Controller
for ($i = 1; $i <= 4; $i++) {
if (!is_null($labels_array[($i - 1)])) {
DB::insert('INSERT INTO labels_assigned (label_id, service_id) values (?, ?)', [$labels_array[($i - 1)], $server_id]);
DB::insert('INSERT IGNORE INTO labels_assigned (label_id, service_id) values (?, ?)', [$labels_array[($i - 1)], $server_id]);
}
}