I have three tables:
form_1
=================================================
app_id | f_name | l_name | admin_id
-------------------------------------------------
0 | Paul | Simon | 25
1 | Art | Garfunkel | 25
form_2
=================================================
app_id | f_name | l_name | admin_id
-------------------------------------------------
0 | Jack | White | 25
1 | Meg | White | 25
admins
=================================================
admin_id| f_name | l_name | admin_id
-------------------------------------------------
0 | Frank | Gallagher | 25
The tables have many more fields, and I’d like to show a handful of the same fields from both form_1 and form_2.
When displaying the data, I also need to show the admin’s f_name and l_name, by way of their ID.
I had this working fine when there was only form_1 and the admin table:
SELECT
form_1.app_id,
form_1.f_name,
form_1.l_name,
admins.f_name,
admins.l_name
FROM form_1
LEFT OUTER
JOIN admins
ON admins.admin_id = form_1.admin_id
But how to add form_2 to this is throwing me off. I’m wondering if it would be better practice to get the admin table out of the query and into a separate array to check against using PHP? Or if I should somehow join the three tables in the same query?