I want to use a Boolean function to know if a patient has been assigned to a doctor; Patient table; \[code\]Examined (type): tinyint1\[/code\]and the values are currently \[code\]0, 0, 0\[/code\]I want to incorporate this into the table so that it indicates if he they been examined by a doctor. If the patient has been examined, then don't show him in the table. How would i do this? Tables of results; \[code\]PatientID Forename Surname Gender Illness Priority Waiting Time278 sarah harding F Immediate moderate 06:28:41\[/code\]How would i incorporate this code; \[code\]<input type="radio" name="examined" @if(!examined){<text> checked="checked"</text>} value="http://stackoverflow.com/questions/15669571/True" />YES<input type="radio" name="examined" @if(!examined){<text> checked="checked"</text>} value="http://stackoverflow.com/questions/15669571/False" />NO\[/code\]EDIT \[code\]<?php$conn = mysqli_connect("localhost","root","") or die ("No connection");mysqli_select_db($conn, "a&e") or die('Could not select database.');$query = "SELECT PatientID, Forename, Surname, Gender, Illness, Priority, Arrival_time,NOW() as now,ABS(TIMEDIFF(NOW(), Arrival_time)) as Waiting_Time FROM Patient";$result = mysqli_query($conn, $query) or die("Invalid query"); /** * Convert number of seconds into hours, minutes and seconds * and return an array containing those values * * @param integer $seconds Number of seconds to parse * @return array */function secondsToTime($seconds){ // extract hours $hours = floor($seconds / (60 * 60)); // extract minutes $divisor_for_minutes = $seconds % (60 * 60); $minutes = floor($divisor_for_minutes / 60); // extract the remaining seconds $divisor_for_seconds = $divisor_for_minutes % 60; $seconds = ceil($divisor_for_seconds); // return the final array $obj = array( "h" => (int) $hours, "m" => (int) $minutes, "s" => (int) $seconds, ); return $obj;}echo "<table border='1'><tr><th>PatientID</th><th>Forename</th><th>Surname</th><th>Gender</th><th>Illness</th><th>Priority</th><th>Waiting Time</th></tr>";while ($row = $result->fetch_object()){//Select the expected and discharge time for this patient. $query2 = "SELECT Abs(TIMEDIFF(Expected_Time,'00:00:00')) as Expected,Abs(TIMEDIFF(Discharge_Time,'00:00:00')) as Discharge ". "FROM priority_time ". "WHERE Illness = '".$row->Illness."'". " AND Priority = '".$row->Priority."'". ";"; $result2 = mysqli_query($conn, $query2) or die("Invalid statement: ".$query2); $row2 = $result2->fetch_object(); $expected = $row2->Expected; $discharge = $row2->Discharge; if($expected > $discharge){ echo "There is a problem with the database consistency, expectedTime must be less than dischargeTime!"; } //Set the patient color. if($row->Waiting_Time < $expected && $row->Waiting_Time < $discharge){ echo "<tr>"; } if($row->Waiting_Time >= $expected && $row->Waiting_Time < $discharge){ echo '<tr bgcolor="#FFFF00">'; } if($row->Waiting_Time > $expected && $row->Waiting_Time > $discharge){ echo '<tr bgcolor="#FF0000">'; } //Print patient info echo "<td>" . $row->PatientID . "</td> <td>" . $row->Forename . "</td> <td>" . $row->Surname . "</td> <td>" . $row->Gender . "</td> <td>" . $row->Illness . "</td> <td>" . $row->Priority . "</td> <td>" . gmdate("H:i:s", $row->Waiting_Time)." </td>"; //Close row echo "</tr>";}echo "</table>";mysqli_close($conn);?>\[/code\]