原帖由 tkf88 于 2019-04-18 12:50:35 发表 加条件:cid=分类id |
不是很懂,本人小白,请问一下是加在这个地方吗?然后那个分类名怎么调用呢? -------- <?php $favasql=$empire->query("select favaid,favatime,id,classid from {$dbtbpre}enewsfava where userid='$userid' and cid=1 order by favaid desc"); while($fr=$empire->fetch($favasql)) { if(empty($class_r[$fr[classid]][tbname])) {continue;} $infor=$empire->fetch1("select title,titleurl,groupid,filename,newspath,onclick,classid,id,newstime from {$dbtbpre}ecms_news where id='$fr[id]' limit 1"); $titlelink=sys_ReturnBqTitleLink($infor);//标题链接 if(!$infor['id']) { $infor['title']="此信息已删除"; $titlelink="#EmpireCMS"; } ?> <table> <tbody> <tr> <td class="infotitle"><a href="<?=$titlelink?>" target="_blank"><?=$infor[title]?></a></td> <td class="click"><?=$infor[onclick]?></td> <td class="time"><?=date("Y-m-d",$infor[newstime])?></td> </tr> </tbody> </table> <? } ?>
<?php $favasql=$empire->query("select favaid,favatime,id,classid from {$dbtbpre}enewsfava where userid='$userid' and cid=2 order by favaid desc"); while($fr=$empire->fetch($favasql)) { if(empty($class_r[$fr[classid]][tbname])) {continue;} $infor=$empire->fetch1("select title,titleurl,groupid,filename,newspath,onclick,classid,id,newstime from {$dbtbpre}ecms_news where id='$fr[id]' limit 1"); $titlelink=sys_ReturnBqTitleLink($infor);//标题链接 if(!$infor['id']) { $infor['title']="此信息已删除"; $titlelink="#EmpireCMS"; } ?> <table> <tbody> <tr> <td class="infotitle"><a href="<?=$titlelink?>" target="_blank"><?=$infor[title]?></a></td> <td class="click"><?=$infor[onclick]?></td> <td class="time"><?=date("Y-m-d",$infor[newstime])?></td> </tr> </tbody> </table> <? } ?> --------
|