Code-Samples/php/Php-rightjoin.php Implementing RIGHT JOIN connect_error) { die("Connection not established: " . $connection->connect_error); } $query = "Use Hospital;"; $connection->query($query); // Implementing RIGHT JOIN $query = "SELECT patient.patient_fname, patient.patient_age, department.dep_name ". "FROM patient RIGHT JOIN department ". "ON patient.dep_id = department.dep_id"; $output = $connection->query($query); if ($output->num_rows > 0) { // output data of each row while($row = $output->fetch_assoc()) { echo "First Name: " . $row["patient_fname"]. " - Age: " . $row["patient_age"]. " - Department: " . $row["dep_name"]. "
"; } } else { echo "0 results"; } $connection->clos