how to get data from three tables by a join statement in mysql

Marlindi74

New Member
In my application i have three tables, reservation, patient and sub_unit, i need to take the patient_id from reservation table and query the patient table for patient data,same time i need to take the sub_unit_id from the reservation table and query the sub_unit name from the sub_unit table... i need to put all this data in to an one array in the sequence like patient_id, sub_unit_name, patient_name, address and pass it to the Codeigniter table class to draw a table.How can I query three tables in the same time to query out this data? can you guys help me out?
 
Back
Top