Skip to content

Commit

Permalink
Changed column name back to current
Browse files Browse the repository at this point in the history
  • Loading branch information
MPZinke committed Feb 18, 2019
1 parent 92a1190 commit 9e3bf83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions class/TrainingModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function certify_training($operator, $staff){
if ($results = $mysqli->query("
SELECT *
FROM `tm_enroll`
WHERE tm_id = $this->tm_id AND operator = ".$staff->getOperator()." AND `revoked` = 'N'
WHERE tm_id = $this->tm_id AND operator = ".$staff->getOperator()." AND `current` = 'Y'
")){
if( $results->num_rows == 1 || $staff->getRoleID() > 9) {
//True when they have the related training
Expand All @@ -91,9 +91,9 @@ public function certify_training($operator, $staff){

if ($mysqli->query("
INSERT INTO `tm_enroll`
(`tm_id`, `operator`, `completed`, `staff_id`, `revoked`)
(`tm_id`, `operator`, `completed`, `staff_id`, `current`)
VALUES
('$this->tm_id', '$operator', CURRENT_TIME(), '".$staff->getOperator()."', 'N');
('$this->tm_id', '$operator', CURRENT_TIME(), '".$staff->getOperator()."', 'Y');
")){
return true;
} elseif ( strpos($mysqli->error, "Duplicate") === 0) {
Expand Down

0 comments on commit 9e3bf83

Please sign in to comment.