列表頁調(diào)用會員任意字段信息標(biāo)簽.
第一種:
1. [field:mid runphp=yes]
2. $tsql = new DedeSql(false);
3. $mid = ”;
4. $tsql->SetQuery("Select m.mid,m.userid,c.company,c.address,c.url FROM dede_member m left join dede_member_company c on m.mid = c.mid where m.mid=’@me’");
5. $tsql->Execute(‘t’);
6. while($row = $tsql->GetArray(‘t’,MYSQL_ASSOC))
7. {
8. $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>";
9. }
10. @me=$mid;
11. [/field:mid]
第二種:
1. [field:mid runphp=yes]
2. $tsql = new DedeSql(false);
3. $mid = ”;
4. $tsql->SetQuery("Select mid,company,address From dede_member_company where mid=’@me’");
5. $tsql->Execute(‘t’);
6. while($row = $tsql->GetArray(‘t’,MYSQL_ASSOC))
7. {
8. $mid = $row['address'];
9. }
10. @me=$mid;
11. [/field:mid]
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: 織夢實現(xiàn)列表調(diào)用會員任意信息字段