title: Progress bar of open/completed tickets over total tickets
body: <p>Front end of the progrss bar is looking good, but i am having problem with the back end. My problem is i can't get the correct amount of tickets especially total tickets. 
  opened ticket in database should have value of 0</p>
  
  <pre><code>$row_count2 =  sqlsrv_query($NEI,"
                  SELECT Count(Tickets.ID) AS Open_Tickets 
                  FROM   (
                              (SELECT ID FROM TicketO  WHERE TicketO.Assigned = '0')                                      
                          ) AS Tickets
              ;",array($_GET['ID']));
      echo $r ? number_format(sqlsrv_fetch_array($row_count2)['Open_Tickets']) : 0;
             $open_tickets = number_format(sqlsrv_fetch_array($row_count2)['Open_Tickets']);
  </code></pre>
  
  <p>assigned tickets in database should have value of 1</p>
  
  <pre><code>    $row_count3 =  sqlsrv_query($NEI,"
                  SELECT Count(Tickets.ID) AS Assigned_Tickets 
                  FROM   (
                              (SELECT ID FROM TicketO  WHERE TicketO.Assigned = '1')                                      
                          ) AS Tickets
              ;",array($_GET['ID']));
      echo $r ? number_format(sqlsrv_fetch_array($row_count3)['Assigned_Tickets']) : 0;
              $assigned_tickets =  number_format(sqlsrv_fetch_array($row_count3)['Assigned_Tickets']);
  </code></pre>
  
  <p>but I cant get the total tickets, the code below is for total tickets of a location, but Im looking for total tickets of a person. </p>
  
  <pre><code>    $r = sqlsrv_query($NEI,"
                  SELECT Count(Tickets.ID) AS Count_of_Tickets 
                  FROM   (
                              (SELECT ID FROM TicketO WHERE TicketO.LID = ?)
                              UNION ALL 
                              (SELECT ID FROM TicketD WHERE TicketD.Loc = ?)
                              UNION ALL
                              (SELECT ID FROM TicketDArchive WHERE TicketDArchive.Loc = ?)
                          ) AS Tickets
              ;",array($_GET['ID'],$_GET['ID'],$_GET['ID']));
              echo $r ? number_format(sqlsrv_fetch_array($r)['Count_of_Tickets']) : 0;    
              $total = number_format(sqlsrv_fetch_array($r)['Count_of_Tickets']);
  </code></pre>