织梦DEDECMS实现列表调用会员任意信息字段,列表页调用织梦DEDECMS会员任意字段信息标签 。第一种: 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 .= "
  • 公司名:".$row["company"]."
  • "."
  • 公司网址:".$row["url"]."

  • "; 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]

    推荐内容