总共有三种方法
方法一:(推荐)
{dede:sql sql="se lect * from dede_archives where typeid = ~typeid~"}[field:title/]{/dede:sql}
方法二:
{dede:arclist} [field:typeid runphp='yes'/] $tsql = new DedeSql(false); $myid = ''; $tsql->SetQuery("SEL ECT downloadpdf,model FROM dede_addongenerator where typeid='@me' LIMIT:0 , 10"); $tsql->Execute('t'); while($row = $tsql->GetArray('t',MYSQL_ASSOC)){ $myid .= "".$row['model'].""; } @me=$myid; [/field:typeid] {/dede:arclist}
方法三:
{dede:sql sql="SE LECT * FROM shop_room where shopid="" ORDER BY `sort_id`"} {/dede:sql}