本文整理汇总了PHP中ArrayIterator::fetchAll方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayIterator::fetchAll方法的具体用法?PHP ArrayIterator::fetchAll怎么用?PHP ArrayIterator::fetchAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayIterator
的用法示例。
在下文中一共展示了ArrayIterator::fetchAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
}
if ($_GET["timeStamp_begin"] != "") {
$scoreQuery .= "and timeStamp >= \"" . $_GET["timeStamp_begin"] . "\" ";
}
if ($_GET["timeStamp_end"] != "") {
$scoreQuery .= "and timeStamp <= \"" . $_GET["timeStamp_end"] . "\" ";
}
$scoreQuery .= " GROUP BY timeStamp, map_scores.match_id;";
//
//
//
$resultSet = $conn->query($scoreQuery);
if ($resultSet->rowCount() == 0) {
die("<b>No data returned.</b>");
}
$resultSet = new ArrayIterator($resultSet->fetchAll());
$redName = $conn->query("SELECT name FROM server_info INNER JOIN match_details ON red_srv=srv_id WHERE match_id = \"" . $_GET["region"] . "-" . $_GET["match_num"] . "\" AND week_num = \"" . $_GET["week_num"] . "\";");
$blueName = $conn->query("SELECT name FROM server_info INNER JOIN match_details ON blue_srv=srv_id WHERE match_id = \"" . $_GET["region"] . "-" . $_GET["match_num"] . "\" AND week_num = \"" . $_GET["week_num"] . "\";");
$greenName = $conn->query("SELECT name FROM server_info INNER JOIN match_details ON green_srv=srv_id WHERE match_id = \"" . $_GET["region"] . "-" . $_GET["match_num"] . "\" AND week_num = \"" . $_GET["week_num"] . "\";");
echo "<center><table border=\"1\"><tr><td style=\"padding:8px\" bgcolor=\"#00cc00\">" . $greenName->fetchColumn() . "</td><td>|</td><td style=\"padding:8px\" bgcolor=\"#3399ff\">" . $blueName->fetchColumn() . "</td><td>|</td><td style=\"padding:8px\" bgcolor=\"#ff5050\">" . $redName->fetchColumn() . "</td></tr></table></center>";
echo "<table><tr><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green PPT", "Blue PPT", "Red PPT")), "PPT", "ppt_chart");
echo "</td><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green Score", "Blue Score", "Red Score")), "Scores", "score_chart");
echo "</td></tr><tr><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green Kills", "Blue Kills", "Red Kills")), "Kills", "kills_chart");
echo "</td><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green Deaths", "Blue Deaths", "Red Deaths")), "Deaths", "deaths_chart");
echo "</td></tr><tr><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green KD%", "Blue KD%", "Red KD%")), "KD Ratio", "kd_chart");
?>