possibly close fix? (#54)

This commit was merged in pull request #54.
This commit is contained in:
Alexander Davis
2020-08-09 22:35:21 +01:00
committed by GitHub
parent df276c708f
commit df0bf2dcd8
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
} }
function get_my_open_requests($db) { function get_my_open_requests($db) {
$ticket_stmt = "SELECT * FROM tickets WHERE created_by=:uuid" AND status != 'Closed'; $ticket_stmt = "SELECT * FROM tickets WHERE created_by=:uuid AND status != 'Closed'";
$ticket_sql = $db->prepare($ticket_stmt); $ticket_sql = $db->prepare($ticket_stmt);
$ticket_sql->bindParam(':uuid', $_SESSION['uuid']); $ticket_sql->bindParam(':uuid', $_SESSION['uuid']);
$ticket_sql->execute(); $ticket_sql->execute();

View File

@@ -10,7 +10,7 @@
if ($is_authorised == true) { if ($is_authorised == true) {
if($_SERVER['REQUEST_METHOD'] == 'POST') { if($_SERVER['REQUEST_METHOD'] == 'POST') {
try { try {
$stmt = "UPDATE tickets SET status='Closed' WHERE uuid=:uuid"; $stmt = "UPDATE tickets SET status= 5 WHERE uuid=:uuid";
$sql = $db->prepare($stmt); $sql = $db->prepare($stmt);
$sql->bindParam(':uuid', $request['uuid']); $sql->bindParam(':uuid', $request['uuid']);
$sql->execute(); $sql->execute();