重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
本来不想回答
创新互联公司于2013年开始,先为姜堰等服务建站,姜堰等地企业,进行企业商务咨询服务。为姜堰企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。
去年做过项目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表数据
关联取附表简介
并取标签
附加顶功能
动态浏览量等
你也是用灵动标签调取的吧!
前四条新闻可以添加时候设置一级推荐,在灵动标签调取的时候选择该栏目下的一级推荐文章,后面不带图片的设置成推荐为0,即'isgood=0'就可以了。
楼主要说清楚,你是要调用栏目下的文章还是栏目的名字?或者栏目里文章的数量?不同的调用有不同的写法。当然最灵活强大的是用灵动标签e::loop
1、调用栏目名称: ?=$class_r[栏目ID]['classname']?
示例:?=$class_r[1]['classname']? ,在这种情况下,就可以正常显示栏目id为1的栏目名称。
2、
调用栏目链接: ?=$class_r[栏目ID]['classpath']?
特别说明:因为调用的时候,后台会没有“/”,你可以这样写:"?=$class_r[1]['classpath']?/ "
,如此一来,后台就能正常显示一个斜杠了。
3、调用指定id的栏目别名: ?=$class_r[栏目ID]['bname']?