Database error select au.user_id,au.type,au.title,au.title_url,au.title_url_new from tbl__userlike ul join vw__all_users_full au on au.type = ul.from_resident_type and au.user_id = ul.from_resident_id where to_resident_type='agency' and to_resident_id='7701' and au.active = 1 and au.registration_confirmed = 1