當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PMA_DBI_get_warnings函數代碼示例

本文整理匯總了PHP中PMA_DBI_get_warnings函數的典型用法代碼示例。如果您正苦於以下問題:PHP PMA_DBI_get_warnings函數的具體用法?PHP PMA_DBI_get_warnings怎麽用?PHP PMA_DBI_get_warnings使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了PMA_DBI_get_warnings函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: PMA_getWarningMessages

/**
 * get the warning messages array
 *
 * @return array  $warning_essages
 */
function PMA_getWarningMessages()
{
    $warning_essages = array();
    foreach (PMA_DBI_get_warnings() as $warning) {
        $warning_essages[] = PMA_Message::sanitize($warning['Level'] . ': #' . $warning['Code'] . ' ' . $warning['Message']);
    }
    return $warning_essages;
}
開發者ID:nhodges,項目名稱:phpmyadmin,代碼行數:13,代碼來源:insert_edit.lib.php

示例2: PMA_DBI_insert_id

        }
        $insert_id = PMA_DBI_insert_id();
        if ($insert_id != 0) {
            // insert_id is id of FIRST record inserted in one insert, so if we
            // inserted multiple rows, we had to increment this
            if ($total_affected_rows > 0) {
                $insert_id = $insert_id + $total_affected_rows - 1;
            }
            $last_message = PMA_Message::notice('strInsertedRowId');
            $last_message->addParam($insert_id);
            $last_messages[] = $last_message;
        }
        PMA_DBI_free_result($result);
    }
    // end if
    foreach (PMA_DBI_get_warnings() as $warning) {
        $warning_messages[] = $warning['Level'] . ': #' . $warning['Code'] . ' ' . $warning['Message'];
    }
    unset($result);
}
unset($single_query, $query);
$message->addParam($total_affected_rows);
$message->addMessages($last_messages, '<br />');
if (!empty($warning_messages)) {
    /**
     * @todo use a <div class="warning"> in PMA_showMessage() for this part of
     * the message
     */
    $message->addMessages($warning_messages, '<br />');
    $message->isWarning(true);
}
開發者ID:noriotakei,項目名稱:suraimu,代碼行數:31,代碼來源:tbl_replace.php

示例3: PMA_getWarningMessagesArray

/**
 * Get warning messages array
 *
 * @return array  $warning_messages
 */
function PMA_getWarningMessagesArray()
{
    $warning_messages = array();
    foreach (PMA_DBI_get_warnings() as $warning) {
        // In MariaDB 5.1.44, when altering a table from Maria to MyISAM
        // and if TRANSACTIONAL was set, the system reports an error;
        // I discussed with a Maria developer and he agrees that this
        // should not be reported with a Level of Error, so here
        // I just ignore it. But there are other 1478 messages
        // that it's better to show.
        if (!($_REQUEST['new_tbl_storage_engine'] == 'MyISAM' && $warning['Code'] == '1478' && $warning['Level'] == 'Error')) {
            $warning_messages[] = $warning['Level'] . ': #' . $warning['Code'] . ' ' . $warning['Message'];
        }
    }
    return $warning_messages;
}
開發者ID:fanscky,項目名稱:HTPMS,代碼行數:21,代碼來源:operations.lib.php


注:本文中的PMA_DBI_get_warnings函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。