select t2.fmsgscore,
       t2.fnamescore,
       t2.fphonenumberscore,
       t2.fgrade1name,
       t2.fgrade2name,
       t2.fgrade3name,
       t2.fgrade4name,
       t2.fgrade5name,
       t2.fgrade1score,
       t2.fgrade2score,
       t2.fgrade3score,
       t2.fgrade4score,
       t2.fgrade5score,
       t2.tagents_workerscoreruleid
from tagents t1
left join tagents_workerscorerule t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$