]> git.joonet.de Git - adminer.git/commitdiff
SQLite: Select primary key column on correct position
authorJakub Vrana <jakub@vrana.cz>
Sun, 9 Sep 2012 05:03:19 +0000 (22:03 -0700)
committerJakub Vrana <jakub@vrana.cz>
Sun, 9 Sep 2012 05:13:28 +0000 (22:13 -0700)
adminer/select.inc.php

index 386ee9bed4237f771033d9d2054fb9dca300a3e5..3e448941d44c55a0f2e169165b4e2d1af414a455 100644 (file)
@@ -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()) {