mirror of
https://github.com/vrana/adminer.git
synced 2026-06-16 17:51:42 +02:00
Fix $result visibility
This commit is contained in:
@@ -104,10 +104,7 @@ if (isset($_GET["pgsql"])) {
|
||||
|
||||
function result($query, $field = 0) {
|
||||
$result = $this->query($query);
|
||||
if (!$result || !$result->num_rows) {
|
||||
return false;
|
||||
}
|
||||
return pg_fetch_result($result->result, 0, $field);
|
||||
return ($result ? $result->fetch_column($field) : false);
|
||||
}
|
||||
|
||||
function warnings() {
|
||||
@@ -132,6 +129,10 @@ if (isset($_GET["pgsql"])) {
|
||||
return pg_fetch_row($this->result);
|
||||
}
|
||||
|
||||
function fetch_column($field) {
|
||||
return ($this->num_rows ? pg_fetch_result($this->result, 0, $field) : false);
|
||||
}
|
||||
|
||||
function fetch_field() {
|
||||
$column = $this->offset++;
|
||||
$return = new \stdClass;
|
||||
|
||||
Reference in New Issue
Block a user