dedecms织梦dede:channel里面调用文章列表
发布时间:2022-09-02 10:23:24 所属栏目:教程 来源:互联网
导读:01 {dede:channel type=son noself=yes} 02 [field:id runphp=yes] 03 global $dsql; 04 $sql = SELECT arc.* FROM `mydiy_archives` arc where arc.arcrank-1 AND arc.typeid = @me ORDER BY arc.id desc limit 10; 05 $dsql-SetQuery($sql); 06 $dsql-Exec
01 {dede:channel type='son' noself='yes'} 02 [field:id runphp=yes] 03 global $dsql; 04 $sql = "SELECT arc.* FROM `mydiy_archives` arc where arc.arcrank>-1 AND arc.typeid = @me ORDER BY arc.id desc limit 10"; 05 $dsql->SetQuery($sql); 06 $dsql->Execute('t'); 07 $result = ''; 08 while($row = $dsql->GetArray('t')) 09 { 10 $arcurl = GetOneArchive($row['id']); 11 $pubdate = MyDate('m-d',$row['pubdate']); 12 $result .= <<< TPL 13 <dt><a href="{$arcurl['arcurl']}"><span class="aa2">{$row['title']}</span><span class="aa3">{$pubdate}</span></a></dt> 14 TPL; 15 } 16 @me = $result; 17 [/field:id] 18 {/dede:channel} (编辑:周口站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |