织梦CMS实现列表调用会员任意信息字段
织梦DEDECMS实现列表调用会员任意信息字段,列表页调用织梦DEDECMS会员任意字段信息标签 。
第一种:
$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.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 >公司网址:<a href=’".$row['url']."’ target=_blank>".$row['url']."</a></li><br>";
}
@me=$mid;
第二种:
$tsql = new DedeSql(false);
$mid = ”;
$tsql->SetQuery("Select mid,company,address From dede_member_companywhere mid=’@me’");
$tsql->Execute(‘t’);
while($row = $tsql->GetArray(‘t’,MYSQL_ASSOC))
{
$mid = $row['address'];
}
@me=$mid;
文档来源:网络转载 http://www.adminbuy.cn/dedecmsjc/9192.html
页:
[1]