|
织梦DEDECMS实现列表调用会员任意信息字段,
列表页调用织梦DEDECMS会员任意字段信息标签 。
第一种:
[field:mid runphp=yes,
$tsql = new DedeSql(false);
$mid = ”;
$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’");
$tsql->Execute(‘t’);
while($row = $tsql->GetArray(‘t’,MYSQL_ASSOC))
{
$mid .= "公司名:[url=,".$row['company',."[/url]"."公司网址:[url=,".$row['url',."[/url]
";
}
@me=$mid;
[/field:mid,
第二种:
[field:mid runphp=yes,
$tsql = new DedeSql(false);
$mid = ”;
$tsql->SetQuery("Select mid,company,address From dede_member_company where mid=’@me’");
$tsql->Execute(‘t’);
while($row = $tsql->GetArray(‘t’,MYSQL_ASSOC))
{
$mid = $row['address',;
}
@me=$mid;
[/field:mid, |
|