MYSQL get the name from another table that is associated with the first table
- by Juan Gonzales
I can't figure out why this statement is not working
SELECT myChurches.id AS id, myChurches.church_name AS church_name
FROM myChurches
INNER JOIN church_staff
ON church_staff.church_id=myChurches.id
WHERE church_staff.mem_id='$logOptions_id'
ORDER BY myChurches.church_name
ASC
Basically I need to find the person's that are staff members of a church from one table and want to get the 'name' of that church FROM the 'myChurches' table. Hopefully that makes sense. Thanks in advance