天天看點

DEDECMS 如何在标簽中嵌套調用SQL

{dede:field.id runphp='yes'}

$tsql = new DedeSql(false);

$tsql->SetQuery("select * from #@__archives where id=@me");

$tags = "";

$tsql->Execute('t');

while($row = $tsql->GetArray('t',MYSQL_ASSOC)){

$tags .= $row['title'];

}

@me = $tags;

{/dede:field.id}

本文轉自黃聰部落格園部落格,原文連結:http://www.cnblogs.com/huangcong/archive/2011/04/28/2031575.html,如需轉載請自行聯系原作者