select t1.tagentsid,t1.fagentname,
t2.tstoreid,t2.fstorenum,t2.fstorename,t2.fprovince,t2.fcity,t2.fcounty,t2.faddress,
t2.fcontact,t2.fwechatno,t2.femail,t2.fphonenumber,
t2.fstartdate,t2.fmarket,t2.fstoretype,t2.farea,t2.fstatus from tagents t1
inner join tstore t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid
where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and t2.tstoreid=$tstoreid$
