帝国CMS多表调用最新信息的方法

这篇文章主要为大家介绍了帝国CMS多表调用最新信息的方法,主要通过灵动标签的sql语句调用结合union来实现,是非常实用的技巧,需要的朋友可以参考下

本文实例讲述了帝国CMS多表调用最新信息的方法。分享给大家供大家参考。具体实现方法如下:

复制代码代码如下:

[e:loop={'select * from (select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_news where newstime unionselect id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_photo where newstime unionselect id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_flash where newstime unionselect id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_article where newstime) a order by newstime desc limit 10',10,24,1}][/e:loop]帝国CMS多表调用最新信息,该演示代码为默认数据表下全站最新10条图片信息,自己根据需求可以附加条件,实现全站点击,全站头条,全站推荐等等.

希望本文所述对大家的帝国CMS建站有所帮助。

有了你,我不再作孤飞于蓝天的雄鹰,

帝国CMS多表调用最新信息的方法

相关文章:

你感兴趣的文章:

标签云: