其实还简单的,list.var中代码如下:

$rr = $empire->fetch1("SELECT GROUP_CONCAT(id) from phome_enewsztinfo where ztid='$r[id]'");
$ff = $rr[0];
$ga = explode(",", $ff);
for ($i = 0; $i < 6; $i++) {
    if ($ga[$i]) {
        $cc = $empire->fetch1("select * from phome_ecms_app where id='$ga[$i]'");
        
        // 查询phome_enewsclass表
        $classInfo = $empire->fetch1("select * from phome_enewsclass where classid='$cc[classid]'");
        $classname = $classInfo['classname'];

        $nr .= '<li><a href="'.$cc[titleurl].'" get" target="_blank">target="_blank"><img src="'.$cc[titlepic].'" alt="'.$cc[title].'" /><p>'.$cc[title].'</p><span>'.$classname.'</span></a></li>';
    }
}
$num = $empire->gettotal("select count(*) as total from phome_enewsztinfo where ztid='$r[id]'");
$listtemp = '<li>
    <a href="/[!--titleurl--]/" target="_blank"><img src="[!--titlepic--]" alt="[!--title--]"/></a>
    <div class="info">
        <a href="/[!--titleurl--]/" target="_blank"><p class="name">[!--title--]</p><span>更新:[!--newstime--]</span></a>
        <ul>
            '.$nr.'
        </ul>
    </div>
    <em><i class="ico"></i><a href="/[!--titleurl--]/" target="_blank">'.$num.'</a>款</em>
    <div class="line"></div>
</li>';

 

 

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。