}
}
if ($primary) {
- $return[""] = array("type" => "PRIMARY", "columns" => $primary, "lengths" => array());
+ $return[""] = array("type" => "PRIMARY", "columns" => $primary, "lengths" => array()); //! column order, descending
}
$sqls = get_key_vals("SELECT name, sql FROM sqlite_master WHERE type = 'index' AND tbl_name = " . q($table));
foreach (get_rows("PRAGMA index_list(" . table($table) . ")") as $row) {
$index_types[] = "FULLTEXT";
}
$indexes = indexes($TABLE);
+$primary = array();
if ($jush == "sqlite") { // doesn't support primary key
+ $primary = $indexes[""];
unset($index_types[0]);
unset($indexes[""]);
}
<th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>
</thead>
<?php
+if ($primary) {
+ echo "<tr><td>PRIMARY<td>";
+ foreach ($primary["columns"] as $key => $column) {
+ echo "<select disabled>" . optionlist($fields, $column) . "</select>";
+ echo "<label><input disabled type='checkbox'>" . lang('descending') . "</label> ";
+ }
+ echo "<td><td>\n";
+}
$j = 1;
foreach ($row["indexes"] as $index) {
if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) {