PMA\libraries\controllers\table\TableStructureController::getKeyForTablePrimary PHP Метод

getKeyForTablePrimary() защищенный Метод

Gets table primary key
protected getKeyForTablePrimary ( ) : string
Результат string
    protected function getKeyForTablePrimary()
    {
        $this->dbi->selectDb($this->db);
        $result = $this->dbi->query('SHOW KEYS FROM ' . Util::backquote($this->table) . ';');
        $primary = '';
        while ($row = $this->dbi->fetchAssoc($result)) {
            // Backups the list of primary keys
            if ($row['Key_name'] == 'PRIMARY') {
                $primary .= $row['Column_name'] . ', ';
            }
        }
        // end while
        $this->dbi->freeResult($result);
        return $primary;
    }