<commit_before><?php 

/* Get access to database */
global $edmsdb;

?>
<h2 class="sub-header">Repairs & Services</h2>
 <h3>Services in Progress</h3>
  <div class="table-responsive">
    <table class="table table-striped">
     <thead>
     	<tr>
            <th>Service ID</th>
            <th>Technician Name</th>
			<th>Advisor Name</th>
			<th>Customer Name</th>
			<th>Time Opened</th>
			<th></th>
		</tr>
      </thead>
	  <tbody>

	   </tbody>
	</table>
<?php
/**
 * Select
 */
$query = $edmsdb->prepare('SELECT * FROM servicetickets WHERE date_closed = NULL');
$query->execute();


/**
 * Loop through array of Parts table rows and echo out
 */
foreach( $query->fetchAll() as $currentServices )
{
?>

  <tr>
    <td><?php echo $currentServices["id"]; ?></td>
    <td><?php echo $currentServices["tech_id"]; ?></td>
    <td><?php echo $currentServices["advisor_id"]; ?></td>
    <td><?php echo $currentServices["customer_id"]; ?></td>
    <td><?php echo $currentServices["date_opened"]; ?></td>
	<td>
		<button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal" data-id="<?php echo $currentServices["id"]; ?>">Close Service</button>
	</td>
  </tr>

<?php
}

?>
<h3>Schedule a Repair or Service</h3>
			  <form role="schedule-service">
				  <table class="table">
					<tr>
						<td><span class="glyphicon glyphicon-cog"></span> Advisor Name:</td>
						<td>
							<select class="form-control">
								<option>Option 1</option>
								<option>Option 2</option>
								<option>Option 3</option>
								<option>Option 4</option>
								<option>Option 5</option>
							</select></td>
					</tr><commit_msg>Fix SQL query<commit_after><?php 

/* Get access to database */
global $edmsdb;

?>
<h2 class="sub-header">Repairs & Services</h2>
 <h3>Services in Progress</h3>
  <div class="table-responsive">
    <table class="table table-striped">
     <thead>
     	<tr>
            <th>Service ID</th>
            <th>Technician Name</th>
			<th>Advisor Name</th>
			<th>Customer Name</th>
			<th>Time Opened</th>
			<th></th>
		</tr>
      </thead>
	  <tbody>

	   </tbody>
<?php
/**
 * Select
 */
$query = $edmsdb->prepare('SELECT * FROM servicetickets WHERE date_closed IS NULL');
$query->execute();


/**
 * Loop through array of Parts table rows and echo out
 */
foreach( $query->fetchAll() as $currentServices )
{
?>

  <tr>
    <td><?php echo $currentServices["id"]; ?></td>
    <td><?php echo $currentServices["tech_id"]; ?></td>
    <td><?php echo $currentServices["advisor_id"]; ?></td>
    <td><?php echo $currentServices["customer_id"]; ?></td>
    <td><?php echo $currentServices["date_opened"]; ?></td>
	<td>
		<button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal" data-id="<?php echo $currentServices["id"]; ?>">Close Service</button>
	</td>
  </tr>

<?php
}
?>
	</tbody>
</table>
<h3>Schedule a Repair or Service</h3>
			  <form role="schedule-service">
				  <table class="table">
					<tr>
						<td><span class="glyphicon glyphicon-cog"></span> Advisor Name:</td>
						<td>
							<select class="form-control">
								<option>Option 1</option>
								<option>Option 2</option>
								<option>Option 3</option>
								<option>Option 4</option>
								<option>Option 5</option>
							</select></td>
					</tr>
{'fraction_non_alphanumeric': 0.20054694621695535, 'fraction_numerical': 0.006684898207231844, 'mean_word_length': 3.1776649746192893, 'pattern_counts': {'":': 0, '<': 152, '<?xml version=': 0, '>': 158, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3190190', 'n_tokens_mistral': 1317, 'n_tokens_neox': 1134, 'n_words': 255}