function do_unit_test($case) { switch ($case) { case 1: $fArray = array(); $cArray = array(); respDBData($fArray, $cArray); break; case 2: respFieldList("pId"); break; case 3: respFieldList("gSn"); break; case 4: break; } }
} else { $request_action = 'selectDb'; //for test php correctness only } //echo "Action: " .$request_action."<br>"; switch ($request_action) { case "init": /* * Display $recordLimit record of table data on body loading * and init the select option. */ //$recordLimit = $_POST["numOfRecord"]; $recordLimit = 0; $respJSON["data"] = getRecentData($recordLimit); $respJSON["id_list"] = respFieldList("pId"); $respJSON["dev_list"] = respFieldList("gSn"); break; /* case "checkDB": $respJSON["has_updated"] = $_POST["userID"]; break; */ /* case "checkDB": $respJSON["has_updated"] = $_POST["userID"]; break; */ case "selectDb": // $fArray = array(); $cKeys = array("pId", "measure_date", "gSn");