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


PHP game::select方法代码示例

本文整理汇总了PHP中game::select方法的典型用法代码示例。如果您正苦于以下问题:PHP game::select方法的具体用法?PHP game::select怎么用?PHP game::select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在game的用法示例。


在下文中一共展示了game::select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: check

<?php 
require_once 'lib/db.php';
require_once 'lib/competition.php';
require_once 'lib/team.php';
require_once 'lib/game.php';
include 'authenticate.php';
include 'title.php';
$con = DB::connect();
$matchid = $_GET["match"];
$teamnumber = $_GET["team"];
$match = match::select($con, $matchid);
$game = game::select($con, $matchid, $teamnumber);
if ($game == null) {
    $game = new game();
}
// useful for setting checkboxes...
function check($val)
{
    if ($val) {
        echo "checked";
    }
}
$red = $match->RedAlliance;
$blue = $match->BlueAlliance;
$color = 'red';
// figure out if we're scoring a blue or red team, to adjust the color
if ($teamnumber == $blue->TeamOne || $teamnumber == $blue->TeamTwo || $teamnumber == $blue->TeamThree) {
    $color = 'blue';
}
// so we can scout the team in the same position in the next match.
if ($teamnumber == $blue->TeamOne || $teamnumber == $red->TeamOne) {
开发者ID:errorcodexero,项目名称:scouting,代码行数:31,代码来源:score-game.php

示例2: die

if ($match == null) {
    die("match not found.");
}
if ($team == null) {
    die("team not found.");
}
// reportMatch($match);
printf("match = %s, team = %s\n", $match->ID, $match->Number);
/*
$game = new game();
$game->MatchID = $match->ID;
$game->MatchNumber = $match->Number;
$game->TeamNumber = $team->Number;
$game->Autonomous = 9;
$game->Teleop = 42;
$game->Climbing = 20;
$game->ColoredFrisbees = 1;
$game->Offensive = true;
$game->Disqualified = false;
$game->TippedOver = false;
$game->MechanicalFailure = false;
$game->LostCommunication = true;
$game->DidNotMove = false;
$game->Comment = "A really good robot with a long comment.";

$game->insert($con);
*/
$game = game::select($con, $match->ID, $team->Number);
reportGames(array($game));
// $games = $match->selectGames($con);
// reportGames($games);
开发者ID:errorcodexero,项目名称:scouting,代码行数:31,代码来源:make-game.php


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