Problem in Query2==>select * from tbl_photos as p WHERE p.photo_member_id IN (SELECT m.member_id FROM tbl_member as m WHERE m.member_status='Verified') AND p.photo_team_id= ORDER BY p.photo_id DESC