Skip to content

Commit

Permalink
Changed driveRank to be Strategic Scouting page. Added new Strategic …
Browse files Browse the repository at this point in the history
…Data page.
  • Loading branch information
jkmullins committed Nov 3, 2024
1 parent 4e6c423 commit c5745c5
Show file tree
Hide file tree
Showing 6 changed files with 660 additions and 160 deletions.
2 changes: 1 addition & 1 deletion RawData.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<th scope="col">Teleop Amp Notes</th>
<th scope="col">Teleop Amp Misses</th>
<th scope="col">Teleop Speaker Notes</th>
<th scope="col">Teleop Speaker Misess</th>
<th scope="col">Teleop Speaker Misses</th>
<th scope="col">Teleop Passes</th>
<th scope="col">Endgame Stage Level</th>
<th scope="col">Endgame Harmony Level</th>
Expand Down
158 changes: 124 additions & 34 deletions dbHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,23 +254,59 @@ function writeRowToDriveRankTable($data)
$dbConfig = $this->readDbConfig();

$sql = "INSERT INTO " . $dbConfig["driveranktable"] . "(entrykey,
eventcode,
teamnumber,
matchnumber,
scoutname,
driverability,
quickness,
fieldawareness,
gamepiecedrop)
eventcode,
teamnumber,
matchnumber,
scoutname,
driverability,
multinote_starting_zone,
multinote_centerline,
shootsfrom,
passing,
understage,
defense_tactic1,
defense_tactic2,
defense_tactic3,
defense_comment,
against_tactic1,
against_tactic2,
against_comment,
foul1,
foul2,
foul3,
foul4,
foul5,
foul6,
climb_comment,
problem_comment,
general_comment)
VALUES(:entrykey,
:eventcode,
:teamnumber,
:matchnumber,
:scoutname,
:driverability,
:quickness,
:fieldawareness,
:gamepiecedrop)";
:eventcode,
:teamnumber,
:matchnumber,
:scoutname,
:driverability,
:multinote_starting_zone,
:multinote_centerline,
:shootsfrom,
:passing,
:understage,
:defense_tactic1,
:defense_tactic2,
:defense_tactic3,
:defense_comment,
:against_tactic1,
:against_tactic2,
:against_comment,
:foul1,
:foul2,
:foul3,
:foul4,
:foul5,
:foul6,
:climb_comment,
:problem_comment,
:general_comment)";
$prepared_statement = $this->conn->prepare($sql);
$prepared_statement->execute($data);
}
Expand All @@ -279,12 +315,30 @@ function readAllDriveRankData($eventCode)
{
$dbConfig = $this->readDbConfig();
$sql = "SELECT teamnumber,
matchnumber,
scoutname,
driverability,
quickness,
fieldawareness,
gamepiecedrop from " . $dbConfig["driveranktable"] . " where eventcode='" . $eventCode . "'";
matchnumber,
scoutname,
driverability,
multinote_starting_zone,
multinote_centerline,
shootsfrom,
passing,
understage,
defense_tactic1,
defense_tactic2,
defense_tactic3,
defense_comment,
against_tactic1,
against_tactic2,
against_comment,
foul1,
foul2,
foul3,
foul4,
foul5,
foul6,
climb_comment,
problem_comment,
general_comment from " . $dbConfig["driveranktable"] . " where eventcode='" . $eventCode . "'";
$prepared_statement = $this->conn->prepare($sql);
$prepared_statement->execute();
$result = $prepared_statement->fetchAll();
Expand All @@ -295,12 +349,30 @@ function readTeamDriveRankData($teamNumber,$eventCode)
{
$dbConfig = $this->readDbConfig();
$sql = "SELECT teamnumber,
matchnumber,
scoutname,
driverability,
quickness,
fieldawareness,
gamepiecedrop from " . $dbConfig["driveranktable"] . " where
matchnumber,
scoutname,
driverability,
multinote_starting_zone,
multinote_centerline,
shootsfrom,
passing,
understage,
defense_tactic1,
defense_tactic2,
defense_tactic3,
defense_comment,
against_tactic1,
against_tactic2,
against_comment,
foul1,
foul2,
foul3,
foul4,
foul5,
foul6,
climb_comment,
problem_comment,
general_comment from " . $dbConfig["driveranktable"] . " where
eventcode='" . $eventCode . "' AND
teamnumber='" . $teamNumber . "'";
$prepared_statement = $this->conn->prepare($sql);
Expand Down Expand Up @@ -406,13 +478,31 @@ function createDriveRankTable()
$query = "CREATE TABLE " . $dbConfig["db"] . "." . $dbConfig["driveranktable"] . " (
entrykey VARCHAR(60) NOT NULL PRIMARY KEY,
eventcode VARCHAR(10) NOT NULL,
teamnumber VARCHAR(6) NOT NULL,
matchnumber VARCHAR(6) NOT NULL,
scoutname VARCHAR(15) NOT NULL,
teamnumber VARCHAR(6) NOT NULL,
matchnumber VARCHAR(6) NOT NULL,
scoutname VARCHAR(15) NOT NULL,
driverability TINYINT UNSIGNED NOT NULL,
quickness TINYINT UNSIGNED NOT NULL,
fieldawareness TINYINT UNSIGNED NOT NULL,
gamepiecedrop TINYINT UNSIGNED NOT NULL
multinote_starting_zone TINYINT UNSIGNED NOT NULL,
multinote_centerline TINYINT UNSIGNED NOT NULL,
shootsfrom TINYINT UNSIGNED NOT NULL,
passing TINYINT UNSIGNED NOT NULL,
understage TINYINT UNSIGNED NOT NULL,
defense_tactic1 TINYINT UNSIGNED NOT NULL,
defense_tactic2 TINYINT UNSIGNED NOT NULL,
defense_tactic3 TINYINT UNSIGNED NOT NULL,
defense_comment VARCHAR(500) NOT NULL,
against_tactic1 TINYINT UNSIGNED NOT NULL,
against_tactic2 TINYINT UNSIGNED NOT NULL,
against_comment VARCHAR(500) NOT NULL,
foul1 TINYINT UNSIGNED NOT NULL,
foul2 TINYINT UNSIGNED NOT NULL,
foul3 TINYINT UNSIGNED NOT NULL,
foul4 TINYINT UNSIGNED NOT NULL,
foul5 TINYINT UNSIGNED NOT NULL,
foul6 TINYINT UNSIGNED NOT NULL,
climb_comment VARCHAR(500) NOT NULL,
problem_comment VARCHAR(500) NOT NULL,
general_comment VARCHAR(500) NOT NULL
)";
$statement = $conn->prepare($query);
if (!$statement->execute())
Expand Down
Loading

0 comments on commit c5745c5

Please sign in to comment.