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:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user