本文整理匯總了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;
}
}