PMA\libraries\Table::getLastMessage PHP Method

getLastMessage() public method

return the last message
public getLastMessage ( ) : string
return string the last message
    public function getLastMessage()
    {
        return end($this->messages);
    }

Usage Example

示例#1
0
 */
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;
        }
    }
    if (!empty($_REQUEST['new_tbl_storage_engine']) && mb_strtoupper($_REQUEST['new_tbl_storage_engine']) !== $tbl_storage_engine) {
        $new_tbl_storage_engine = mb_strtoupper($_REQUEST['new_tbl_storage_engine']);
        // reset the globals for the new engine
        list($is_myisam_or_aria, $is_innodb, $is_isam, $is_berkeleydb, $is_aria, $is_pbxt) = PMA_setGlobalVariablesForEngine($new_tbl_storage_engine);
        if ($is_aria) {
            $create_options['transactional'] = isset($create_options['transactional']) && $create_options['transactional'] == '0' ? '0' : '1';
All Usage Examples Of PMA\libraries\Table::getLastMessage