possibly close fix?

This commit is contained in:
2020-08-09 22:33:46 +01:00
parent 273f4bd204
commit 35b08083db
2 changed files with 3 additions and 3 deletions

View File

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

View File

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