From aff4d7de91d27dbdf5547a1490312e92fd3d16ae Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sat, 8 Sep 2012 22:03:19 -0700 Subject: [PATCH] SQLite: Select primary key column on correct position --- adminer/select.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 386ee9be..3e448941 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -30,7 +30,7 @@ $is_group = count($group) < count($select); $where = $adminer->selectSearchProcess($fields, $indexes); $order = $adminer->selectOrderProcess($fields, $indexes); $limit = $adminer->selectLimitProcess(); -$from = ($select ? implode(", ", $select) : ($oid ? "$oid, " : "") . "*") . "\nFROM " . table($TABLE); +$from = ($select ? implode(", ", $select) : "*" . ($oid ? ", $oid" : "")) . "\nFROM " . table($TABLE); $group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : ""); if ($_GET["val"] && is_ajax()) {