1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 02:23:59 +02:00

MS SQL: Do not update primary key in CSV import

This commit is contained in:
Jakub Vrana
2025-02-26 22:43:03 +01:00
parent 70f9ff75fc
commit 48a680658c

View File

@@ -194,12 +194,10 @@ if (isset($_GET["mssql"])) {
$c = 0; $c = 0;
foreach ($set as $key => $val) { foreach ($set as $key => $val) {
$c++; $c++;
$name = idf_unescape($key); if (isset($primary[idf_unescape($key)])) {
if (!$fields[$name]["auto_increment"]) {
$update[] = "$key = c$c";
}
if (isset($primary[$name])) {
$where[] = "$key = c$c"; $where[] = "$key = c$c";
} else {
$update[] = "$key = c$c";
} }
} }
$values = array(); $values = array();