select t1.tliveid,
       t1.createby,
       t1.createdate,
       t1.tagentsid,
       t2.fagentname,
       t1.categoryid,
       t1.categoryname,
       t1.channelid,
       t1.channelname,
       t1.livestatus,
       t1.channelcoverimageurl,
       t1.fisneedauth,
       t2.fbrand
from tlive t1
         inner join tagents t2 on t1.siteid = t2.siteid and t1.tagentsid = t2.tagentsid
where t1.siteid = $siteid$
  and t1.tagentsid = $tagentsid$
  and $where$
