当前位置: 首页>>代码示例>>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;未经允许,请勿转载。