重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
[e:loop={'select * from [!db.pre!]ecms_news where checked=1 order by rand() desc limit 10',10,24,0}]
专业从事网站设计制作、成都网站设计,高端网站制作设计,微信小程序定制开发,网站推广的成都做网站的公司。优秀技术团队竭力真诚服务,采用H5开发+CSS3前端渲染技术,响应式网站开发,让网站在手机、平板、PC、微信下都能呈现。建站过程建立专项小组,与您实时在线互动,随时提供解决方案,畅聊想法和感受。
lia href="?=$bqsr['titleurl']?" target="_blank"?=$bqr['title']?/a /li
[/e:loop]
上面的10是随机调用10条内容。
只能列出所有id,没有别的方法,因为如果给你轻易掉出所有的栏目,那么当你只需要调用某一两个的时候怎么办???只能通过这一两个的栏目id调用他们,所有如果你想调用多个就必须填写他们的栏目id,标签这样设计应该也是为了不起冲突,当然如果你会改写的话,写个sql语句直接调用不是太简单了,标签没有这个功能,祝你好运
本来不想回答
去年做过项目4表联合
拿去自己改吧
不会改就没办法
不解释
[e:loop={'select *
from
(
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news where istop=1 order by newstime desc limit 13 )
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news1 where istop=1 order by newstime desc limit 13)
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news2 where istop=1 order by newstime desc limit 13)
Union All
(select id,classid,istop,title,titleurl,titlepic,newstime from phome_ecms_news3 where istop=1 order by newstime desc limit 13)
) as A order by newstime desc limit 20',0,24,0}]
?php
$fb=$empire-fetch1("select *
from
(
(select id,classid,smalltext from phome_ecms_news_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news1_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news2_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,smalltext from phome_ecms_news3_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
) as A");
?
li class="clearfix"
a target='_blank' href="?=$bqr[titleurl]?" title="?=$bqr[title]?" class="index-img"img src="?=$bqr[titlepic]?$bqr[titlepic]:'404.jpg'?" alt="?=$bqr[title]?"/a
div class="index-text"
h1a target='_blank' href="?=$bqr[titleurl]?"?=$bqr[title]?/a
/h1
div class="index-con"/div
div class="index-intro"a target="_blank" href="?=$bqr[titleurl]??from=index_new_intro"?=$fb[smalltext]?/a/div
div class="index-like clearfix"
span class="time"
?php
$fr=$empire-fetch1("select *
from
(
(select id,classid,infotags from phome_ecms_news_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news1_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news2_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
Union All
(select id,classid,infotags from phome_ecms_news3_data_1 where id='$bqr[id]' and classid='$bqr[classid]')
) as A");
$keyr=explode(',',$fr[infotags]);
for($i=0;$i2;$i++)
{
echo'spana href="/liaotian/tags-'.$keyr[$i].'-0.html" target=_blank'.$keyr[$i].'/a/span ';
}
?
/span
span class="time"?=format_datetime($bqr[newstime],"m-d")?/span
div class="post-ope"
a href="/e/public/digg/?classid=?=$bqr[classid]?id=?=$bqr[id]?dotop=1ajaxarea=diggnum?=$bqr[id]?" class="post-like-btn post-like" id="post-like-top-btn"
script
document.write('script src="/e/public/ViewClick/?classid=?=$bqr[classid]?id=?=$bqr[id]?down=5?t='+Math.random()+'"'+'/script');
/script
/a
/div
/div
/div
/li
[/e:loop]
功能:联合取4表数据
关联取附表简介
并取标签
附加顶功能
动态浏览量等
[e:loop={0,12,3,0}]
?php
if($bqno == 1 || $bqno ==6){
?
dt?=$bqr['title']?cu/dt
?php
}else{
?
dd?=$bqr['title']?xi/dd
?php }?
[/e:loop]
调试图片如图: