元素模板为您解答:
只需加入红色部分即可
$sql = "SELECT a.*,t.typedir,t.typename,t.isdefault,t.defaultname,t.namerule,
t.namerule2,t.ispart, t.moresite,t.siteurl,t.sitepath
FROM `dede_archives` as a JOIN `dede_arctype` AS t ON a.typeid=t.id where a.channel=1 ORDER BY id DESC LIMIT $start,$pagesize";