Hi all,

I have a query that I use that is working a treat that basically checks 2 tables (one of images and one of users) and grabs users who have posted an image.

The query is listed below:

select tbl_users.user_id, tbl_users.user_display, max(tbl_images.image_day) as lastPost, max(tbl_images.image_date) as latestImage
from tbl_users
join tbl_images
on tbl_users.user_id = tbl_images.user_id
where tbl_images.image_day <= current_date
and tbl_users.user_status =1

group by tbl_users.user_id
order by lastpost desc, latestImage desc

My question is this, I have a 3rd table that lists people "I follow" can I query which simply has 2 fields - my user_id and their user_id - is there any way i can add this into the current query so that it adds another condition to say AND Where tbl_followers.user_id = tbl_uses.user_id.

Then it will be in laymans terms (the first bit is above - the braketed bit i need to add) - Get the latest photos [from people I follow]

No idea if any of that actually makes sense!