select t1.fparentid, t2.tenterprise_userid, t2.fname, t2.fphonenumber, t2.frole,t2.faccountno
from tenterprise_userdetail t1
         inner join tenterprise_users t2 on t1.siteid = t2.siteid and t1.fsubid = t2.tenterprise_userid
where t1.siteid =$siteid$ and t1.fparentid in $fparentid$