SELECT * from video a LEFT JOIN viddomains b ON a.VID = b.VID INNER JOIN video_view ON a.VID = video_view.VID WHERE b.domainid=7 AND b.domainchannel LIKE '%|85|%' AND type='public' and active = '1' order by rand()