MS SQL: Do not update AI value

This commit is contained in:
Jakub Vrana 2010-11-28 16:35:34 +01:00
parent 4a2fe5eac1
commit 9f69d7ae93
2 changed files with 5 additions and 2 deletions

View file

@ -618,7 +618,11 @@ function input($field, $value, $function) {
global $types, $adminer, $jush;
$name = h(bracket_escape($field["field"]));
echo "<td class='function'>";
$functions = (isset($_GET["select"]) ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field);
$reset = ($jush == "mssql" && $field["auto_increment"]);
if ($reset && !$_POST["save"]) {
$function = null;
}
$functions = (isset($_GET["select"]) || $reset ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field);
$attrs = " name='fields[$name]'";
if ($field["type"] == "enum") {
echo nbsp($functions[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value);

View file

@ -42,7 +42,6 @@ Column rights - http://www.postgresql.org/docs/8.4/static/functions-info.html
bool in Editor
MS SQL:
Edit of AI column
Non UTF-8 character sets
Detection of table collation
PDO_MSSQL and PDO_SQLSRV driver with seek