本文整理匯總了PHP中DbHandler::getTeamNextSoccerMatch方法的典型用法代碼示例。如果您正苦於以下問題:PHP DbHandler::getTeamNextSoccerMatch方法的具體用法?PHP DbHandler::getTeamNextSoccerMatch怎麽用?PHP DbHandler::getTeamNextSoccerMatch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DbHandler
的用法示例。
在下文中一共展示了DbHandler::getTeamNextSoccerMatch方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: echoRespnse
echoRespnse(201, $response);
} else {
/* No scope so respond with 401 Unauthorized */
echoRespnse(401, $response);
}
});
/**
* Gets the next soccer match of aparticular team
* method GET
* url /teams/:teamID/next-soccer-match
*/
$app->get('/teams/:teamID/next-soccer-match', function ($teamID) use($app) {
$req = $app->request();
$response = array();
$db = new DbHandler();
$result = $db->getTeamNextSoccerMatch($teamID);
$nextSoccermatch = $result->fetch_assoc();
$response["Error"] = false;
$response["SoccerMatch"] = $nextSoccermatch;
echoRespnse(200, $response);
});
/**
* Gets the last soccer match result of aparticular team
* method GET
* url /teams/:teamID/last-result'
*/
$app->get('/teams/:teamID/last-result', function ($teamID) use($app) {
$req = $app->request();
$response = array();
$db = new DbHandler();
$result = $db->getTeamLastResult($teamID);