Update app_functions.php #53

Merged
MrLyallCSIT merged 3 commits from brokenchecks into main 2020-08-09 21:26:40 +00:00
Showing only changes of commit dcb8dab3a6 - Show all commits

View File

@@ -14,7 +14,7 @@
return $usr;
}
function get_my_requests($db) {
function get_my_open_requests($db) {
$ticket_stmt = "SELECT * FROM tickets WHERE created_by=:uuid";
$ticket_sql = $db->prepare($ticket_stmt);
luketainton commented 2020-08-09 21:20:26 +00:00 (Migrated from github.com)
Review

Append AND status != 'Closed' to end of statement

Append `AND status != 'Closed'` to end of statement
$ticket_sql->bindParam(':uuid', $_SESSION['uuid']);
@@ -24,7 +24,7 @@
return $ticket_result;
luketainton commented 2020-08-09 21:19:27 +00:00 (Migrated from github.com)
Review

Change to get_my_closed_requests

Change to `get_my_closed_requests`
}
function get_my_open_requests($db) {
function get_my_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']);