SELECT CONCAT(staff_details_form.id,student_details_form.id) as combined_id, staff_details_form.name as `staff_details_form.name`, staff_details_form.email as `staff_details_form.email`, staff_details_form.placeofbirth as `staff_details_form.placeofbirth`,  staff_details_form.selectgender as `staff_details_form.selectgender`, staff_details_form.selectdepartment as `staff_details_form.selectdepartment`, student_details_form.name as `student_details_form.name`, student_details_form.email as `student_details_form.email`,  student_details_form.placeofbirth as `student_details_form.placeofbirth`, student_details_form.selectgender as `student_details_form.selectgender`, student_details_form.selectdepartment as `student_details_form.selectdepartment` FROM staff_details_form INNER JOIN student_details_form ON staff_details_form.placeofbirth = student_details_form.placeofbirth