当前位置: 首页>>代码示例>>PHP>>正文


PHP ArrayIterator::fetchAll方法代码示例

本文整理汇总了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");
?>
开发者ID:JRavet,项目名称:Capstone,代码行数:31,代码来源:map_score_graph.php


注:本文中的ArrayIterator::fetchAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。