Update app_functions.php (#53)

* Update app_functions.php

* Fix bootstrap

* Requested Changes
This commit was merged in pull request #53.
This commit is contained in:
Alexander Davis
2020-08-09 22:26:40 +01:00
committed by GitHub
parent 273f4bd204
commit df276c708f
2 changed files with 3 additions and 4 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();
@@ -24,7 +24,7 @@
return $ticket_result;
}
function get_my_open_requests($db) {
function get_my_closed_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']);

File diff suppressed because one or more lines are too long