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


PHP DatabaseManager::lastErrorMsg方法代碼示例

本文整理匯總了PHP中DatabaseManager::lastErrorMsg方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseManager::lastErrorMsg方法的具體用法?PHP DatabaseManager::lastErrorMsg怎麽用?PHP DatabaseManager::lastErrorMsg使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DatabaseManager的用法示例。


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

示例1: getData

function getData($configs)
{
    $db = new DatabaseManager($configs["name"], $configs["limit"], $configs["limitedRow"]);
    if (!$db) {
        echo $db->lastErrorMsg();
    }
    switch ($configs["type"]) {
        case "keyBits":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("nbEvolutions_allKeyBits"));
            break;
        case "agentLevels":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("nbEvolutions_allAgentLevels"));
            break;
        case "levelsName":
            echo json_encode($db->getSystemsNamesInTable("nbOccurrences_level"));
            break;
        case "occurenceLevel":
            echo json_encode($db->getDataForASystemFromTableInDatabase("nbOccurrences_level", $configs["system"]));
            break;
        case "nist1":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("FrequencyMonobit_NIST_1"));
            break;
        case "nist2":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("FrequencyBlock_NIST_2"));
            break;
        case "nist3":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("Runs_NIST_3"));
            break;
        case "nist4":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("LongestRun_NIST_4"));
            break;
        case "nist5":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("Binary_Matrix_Rank_NIST_5"));
            break;
        case "nist9":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("Maurers_Universal_Statistical_NIST_9"));
            break;
        case "nist10":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("Linear_Complexity_NIST_10"));
            break;
        case "nist12":
            echo json_encode($db->getDataOfAllSystemsFromTableInDatabase("Approximate_Entropy_NIST_12"));
            break;
        case "butterflyName":
            echo json_encode($db->getSystemsNamesInTable("butterfly_effect"));
            break;
        case "butterfly":
            echo json_encode($db->getDataForASystemFromTableInDatabase("butterfly_effect", $configs["system"]));
            break;
        case "levelsVariationName":
            echo json_encode($db->getSystemsNamesInTable("nbOccurrences_levelVariation"));
            break;
        case "occurenceVariation":
            echo json_encode($db->getDataForASystemFromTableInDatabase("nbOccurrences_levelVariation", $configs["system"]));
            break;
        case "distanceEvolution":
            echo json_encode($db->getDataForASystemFromTableInDatabase("distance_between_evolution", $configs["system"]));
            break;
        case "namesForDistanceEvolution":
            echo json_encode($db->getSystemsNamesInTable("distance_between_evolution"));
            break;
        case "overallOccurenceVariation":
            echo json_encode($db->getOverallOccurenceData("overall_nbOccurrences_levelVariation"));
            break;
        case "overallOccurenceLevel":
            echo json_encode($db->getOverallOccurenceData("overall_nbOccurrences_level"));
            break;
        case "overallButterfly":
            echo json_encode($db->getOverallOccurenceData("overall_butterfly"));
            break;
    }
}
開發者ID:Archos-Research,項目名稱:jCHEKS_WebVisualizer,代碼行數:72,代碼來源:getter.php


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