fetchArray() public method

returns array of rows with associative and numeric keys from $result
public fetchArray ( object $result ) : array
$result object result set identifier
return array
Beispiel #1
0
 /**
  * Return UI preferences for this table from phpMyAdmin database.
  *
  * @return array
  */
 protected function getUiPrefsFromDb()
 {
     $cfgRelation = PMA_getRelationsParam();
     $pma_table = Util::backquote($cfgRelation['db']) . "." . Util::backquote($cfgRelation['table_uiprefs']);
     // Read from phpMyAdmin database
     $sql_query = " SELECT `prefs` FROM " . $pma_table . " WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'" . " AND `db_name` = '" . Util::sqlAddSlashes($this->_db_name) . "'" . " AND `table_name` = '" . Util::sqlAddSlashes($this->_name) . "'";
     $row = $this->_dbi->fetchArray(PMA_queryAsControlUser($sql_query));
     if (isset($row[0])) {
         return json_decode($row[0], true);
     } else {
         return array();
     }
 }