[field:mid runphp=yes] $tsql = new DedeSql(false); $mid = ''; $tsql->SetQuery("Select m.mid,m.userid,c.company,c.address,c.url FROM member m left join member_company c on m.mid = c.midwhere m.mid='@me'"); $tsql->Execute('t'); while($row = $tsql->GetArray('t',MYSQL_ASSOC)) { $mid .= "<li >公司名:<a href='/member/index.php?uid=".$row['userid']."' target=_blank>".$row['company']."</a></li>"."<li >公司網(wǎng)址:<a href='".$row['url']."' target=_blank>".$row['url']."</a></li><br>"; } @me=$mid; [/field:mid] |
或簡(jiǎn)單一個(gè)表:
公司地址: [field:mid runphp=yes] $tsql = new DedeSql(false); $mid = ''; $tsql->SetQuery("Select mid,company,address From member_companywhere mid='@me'"); $tsql->Execute('t'); while($row = $tsql->GetArray('t',MYSQL_ASSOC)) { $mid = $row['address']; } @me=$mid; [/field:mid] |
版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: dedecms列表頁(yè)調(diào)用會(huì)員任意字段信息