From: Jakub Vrana Date: Sun, 9 Sep 2012 05:03:19 +0000 (-0700) Subject: SQLite: Select primary key column on correct position X-Git-Tag: v3.6.0~10 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=aff4d7de91d27dbdf5547a1490312e92fd3d16ae;p=adminer.git SQLite: Select primary key column on correct position --- 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()) {