mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 20:01:25 +02:00
Notices: Declare properties in fetch_field()
This commit is contained in:
@@ -25,12 +25,14 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
for ($j=0; $j < count($row); $j++) {
|
||||
$field = $result->fetch_field();
|
||||
$name = $field->name;
|
||||
$orgtable = $field->orgtable;
|
||||
$orgname = $field->orgname;
|
||||
$return[$field->table] = $orgtable;
|
||||
$orgtable = (isset($field->orgtable) ? $field->orgtable : "");
|
||||
$orgname = (isset($field->orgname) ? $field->orgname : $name);
|
||||
if ($orgtables && JUSH == "sql") { // MySQL EXPLAIN
|
||||
$links[$j] = ($name == "table" ? "table=" : ($name == "possible_keys" ? "indexes=" : null));
|
||||
} elseif ($orgtable != "") {
|
||||
if (isset($field->table)) {
|
||||
$return[$field->table] = $orgtable;
|
||||
}
|
||||
if (!isset($indexes[$orgtable])) {
|
||||
// find primary key in each table
|
||||
$indexes[$orgtable] = array();
|
||||
|
@@ -93,8 +93,7 @@ if (extension_loaded('pdo')) {
|
||||
|
||||
function fetch_field() {
|
||||
$row = (object) $this->getColumnMeta($this->_offset++);
|
||||
$row->orgtable = $row->table;
|
||||
$row->orgname = $row->name;
|
||||
$row->type = $row->pdo_type; //! map to MySQL numbers
|
||||
$row->charsetnr = (in_array("blob", (array) $row->flags) ? 63 : 0);
|
||||
return $row;
|
||||
}
|
||||
|
Reference in New Issue
Block a user