1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

Make select(..., , , ) optional

This commit is contained in:
Jakub Vrana
2014-01-15 08:23:26 -08:00
parent e9b5616657
commit 60c8ec61e3
6 changed files with 7 additions and 7 deletions

View File

@@ -89,7 +89,7 @@ if ($_POST["save"]) {
$select = array("*");
}
if ($select) {
$result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1), 0);
$result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1));
$row = $result->fetch_assoc();
if (!$row) { // MySQLi returns null
$row = false;
@@ -102,7 +102,7 @@ if ($_POST["save"]) {
if (!support("table") && !$fields) {
if (!$where) { // insert
$result = $driver->select($TABLE, array("*"), $where, array("*"), array(), 1, 0);
$result = $driver->select($TABLE, array("*"), $where, array("*"));
$row = ($result ? $result->fetch_assoc() : false);
if (!$row) {
$row = array($driver->primary => "");