帝国cms 通过sql语句读取栏目名称建站

SEO新闻
$sql=$empire-query(select * from {$dbtbpre}ecms_news order by newstime desc limit $offset,10); while($r=$empire-fetch($sql)) //循环获取查询记录 { $titleurl=s...

$sql=$empire->query("select * from {$dbtbpre}ecms_news  order by newstime desc limit $offset,10");

while($r=$empire->fetch($sql))        //循环获取查询记录

{

$titleurl=sys_ReturnBqTitleLink($r);        //标题链接

$cl=$empire->fetch1("select classname from phome_enewsclass where classid='$r[classid]'");

?>

<li>

<div class="li_image">

<a href="<?=$titleurl?>"><img src="<?=$r[titlepic]?>"/></a>

</div>

<div class="li_right fr">

<div class="li_title">

<a href="<?=$titleurl?>"><p><?=esub(stripslashes($r[title]),40)?></p></a>

</div>

<div class="li_qt">

<span><?=$cl['classname']?></span>

<p class="time"><?=date('m-d',$r[newstime])?></p>

<p class="option">评论</p>

1
联系我们