1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 17:14:07 +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;
foreach ($set as $key => $val) {
$c++;
$name = idf_unescape($key);
if (!$fields[$name]["auto_increment"]) {
$update[] = "$key = c$c";
}
if (isset($primary[$name])) {
if (isset($primary[idf_unescape($key)])) {
$where[] = "$key = c$c";
} else {
$update[] = "$key = c$c";
}
}
$values = array();