重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

帝国cms跨表调用 帝国cms移动端

帝国cms首页多表调用,要调用栏目缩略图+标题。

本来不想回答

站在用户的角度思考问题,与客户深入沟通,找到革吉网站设计与革吉网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:成都网站设计、成都网站制作、企业官网、英文网站、手机端网站、网站推广、空间域名、虚拟主机、企业邮箱。业务覆盖革吉地区。

去年做过项目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表数据

关联取附表简介

并取标签

附加顶功能

动态浏览量等

帝国CMS如何实现多表信息调用

这里是模板样式 [/e:loop]最新调用: [e:loop={'select title,titleurl,titlepic from [!db.pre!]ecms_photoz where classid in(46,47,51) Union All select title,titleurl,titlepic from [!db.pre!]ecms_downloadz ',0,24,0}] 这里是模板样式 [/e:loop]以上两例是调用图片和下载模型中的。。[!db.pre!]ecms_photoz 图片数据表(注:系统默认是[!db.pre!]ecms_photo)[!db.pre!]ecms_downloadz下载数据表(注:系统默认是[!db.pre!]ecms_download)参数 classid in(46,47,51) 这里是调用的栏目多个用,分开and isgood=1 条件其他参数和灵动标签一样最新5条记录[e:loop={'select title,titleurl,jiage from [!db.pre!]ecms_a where classid in(7) and jiage=100 and jiage=2000 Union All select title,titleurl,jiage from [!db.pre!]ecms_b where classid in(19) and jiage=100 and jiage=2000 limit 5',0,24,0}] lia href="?=$bqsr[titleurl]?"?=$bqr[title]?--?=$bqr[jiage]?

帝国CMS反馈表单如何在别的页面调用

检查 后台反馈提交项 和 必填项 是否填写正确 如果 检查没有错 就请检查表单代码form中的action 提交路径

form name='feedback' method='post' enctype='multipart/form-data' action='/e/enews/index.php'

然后在表单form中间加入input type=hidden name=bid value=4代码 value值 是反馈分类的ID值

如何调用另一数据库的内容 帝国cms

如何调用另一数据库的内容

帝国 CMS首页调用tipask的其实并不难,帝国CMS的tipask问题表是ask_quertion,只需调用表中的字段。

以下是灵动标签实现,

[e:loop={"select id,title from ask_question order by id desc limit 10",10,24,0}]

lia href="/tipask/?q-?=$bqr[id]?" target="_blank" title="?=$bqr[title]?" ?=esub($bqr[title],30)?/a

/li

[/e:loop]

说明:tipask.ask_question 里的“tipask”要替换成你的数据库名称。


网站标题:帝国cms跨表调用 帝国cms移动端
网页URL:http://cqcxhl.com/article/dojppoc.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP