PMA\libraries\Table::getDbName PHP Метод

getDbName() публичный Метод

returns database name for this table
public getDbName ( boolean $backquoted = false ) : string
$backquoted boolean whether to quote name with backticks ``
Результат string database name for this table
    public function getDbName($backquoted = false)
    {
        if ($backquoted) {
            return Util::backquote($this->_db_name);
        }
        return $this->_db_name;
    }

Usage Example

Пример #1
0
 * If the table has to be maintained
 */
if (isset($_REQUEST['table_maintenance'])) {
    include_once 'sql.php';
    unset($result);
}
/**
 * Updates table comment, type and options if required
 */
if (isset($_REQUEST['submitoptions'])) {
    $_message = '';
    $warning_messages = array();
    if (isset($_REQUEST['new_name'])) {
        // Get original names before rename operation
        $oldTable = $pma_table->getName();
        $oldDb = $pma_table->getDbName();
        if ($pma_table->rename($_REQUEST['new_name'])) {
            if (isset($_REQUEST['adjust_privileges']) && !empty($_REQUEST['adjust_privileges'])) {
                PMA_AdjustPrivileges_renameOrMoveTable($oldDb, $oldTable, $_REQUEST['db'], $_REQUEST['new_name']);
            }
            // Reselect the original DB
            $GLOBALS['db'] = $oldDb;
            $GLOBALS['dbi']->selectDb($oldDb);
            $_message .= $pma_table->getLastMessage();
            $result = true;
            $GLOBALS['table'] = $pma_table->getName();
            $reread_info = true;
            $reload = true;
        } else {
            $_message .= $pma_table->getLastError();
            $result = false;
All Usage Examples Of PMA\libraries\Table::getDbName