The goal:
pull from members walls - if two friends share the same churchMember relationship, show streams
pull following tables:
- friends
- wallPosts
- users
- churchMembers
table structures:
friends table:
- id, node1id, node2id
wallPosts:
- entryData
- postingUserId
users:
- userpid
- username
- firstname
- lastname
church members:
- churchid
- userid
How would I put the above requirements into code?
Update:
select all rows that have the same churchId as the one that the user logged in is connected with $churchId = '1';
SELECT * FROM churchMembers WHERE cMchurchId = $churchId
if $row-cMchurchId == $churchId
SELECT * FROM churchMembers, users WHERE churchMembers.cMuserId = users.userid