帝国cms关联文章判断是否为空,为空则不输出,不为空则输出数据


avatar
pcwnas 2023-04-25 122

原文来自:https://liye5.com/

<ul class="clearfix">
<?php
							 $num=$empire->gettotal("select count(*) as total from {$dbtbpre}ecms_news where phoneid='$navinfor[id]'");
							if($num==0){
							?>
							<div id="more-intro">暂无相关文章</div>
                                                    
							<?php } ?>
[e:loop={"select * from phome_ecms_news where phoneid='$navinfor[id]' order by newstime desc limit 1",6,24,0}]						
	<li><a href="<?=$bqsr['titleurl']?>"><span></span><?=$bqr['title']?></a></li>
[/e:loop]
</ul>