帝国cms教程栏目,提供精品建站,仿站,二次开发,安装,标签使用等图文教程,帮助建设和管理好你的帝国cms站点。
用过帝国cms的朋友会发现,帝国cms文章系统模型和新闻系统模型看上去很相似,它们有什么区别,该如何选择呢?
首先我们来看看它们的数据表结构
文章系统模型数据表结构:
CREATE TABLE `phome_ecms_article` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`classid` smallint(5) unsigned NOT NULL DEFAULT '0',
`ttid` smallint(5) unsigned NOT NULL DEFAULT '0',
`onclick` int(10) unsigned NOT NULL DEFAULT '0',
`plnum` mediumint(8) unsigned NOT NULL DEFAULT '0',
`totaldown` mediumint(8) unsigned NOT NULL DEFAULT '0',
`newspath` char(20) NOT NULL DEFAULT '',
`filename` char(36) NOT NULL DEFAULT '',
`userid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`username` char(20) NOT NULL DEFAULT '',
`firsttitle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`isgood` tinyint(3) unsigned NOT NULL DEFAULT '0',
`ispic` tinyint(1) NOT NULL DEFAULT '0',
`istop` tinyint(1) NOT NULL DEFAULT '0',
`isqf` tinyint(1) NOT NULL DEFAULT '0',
`ismember` tinyint(1) NOT NULL DEFAULT '0',
`isurl` tinyint(1) NOT NULL DEFAULT '0',
`truetime` int(10) unsigned NOT NULL DEFAULT '0',
`lastdotime` int(10) unsigned NOT NULL DEFAULT '0',
`havehtml` tinyint(1) NOT NULL DEFAULT '0',
`groupid` smallint(6) NOT NULL DEFAULT '0',
`userfen` smallint(5) unsigned NOT NULL DEFAULT '0',
`titlefont` char(14) NOT NULL DEFAULT '',
`titleurl` char(200) NOT NULL DEFAULT '',
`stb` tinyint(3) unsigned NOT NULL DEFAULT '1',
`fstb` tinyint(3) unsigned NOT NULL DEFAULT '1',
`restb` tinyint(3) unsigned NOT NULL DEFAULT '1',
`keyboard` char(80) NOT NULL DEFAULT '',
`title` char(100) NOT NULL DEFAULT '',
`newstime` int(10) unsigned NOT NULL DEFAULT '0',
`titlepic` char(120) NOT NULL DEFAULT '',
`eckuid` int(11) NOT NULL DEFAULT '0',
`ftitle` char(120) NOT NULL DEFAULT '',
`smalltext` char(255) NOT NULL DEFAULT '',
`writer` char(30) NOT NULL DEFAULT '',
`befrom` char(60) NOT NULL DEFAULT '',
`newstext` char(50) NOT NULL DEFAULT '',
`diggtop` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `classid` (`classid`),
KEY `newstime` (`newstime`),
KEY `ttid` (`ttid`),
KEY `firsttitle` (`firsttitle`),
KEY `isgood` (`isgood`),
KEY `ispic` (`ispic`),
KEY `useridis` (`userid`,`ismember`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
新闻数据表结构:
CREATE TABLE `phome_ecms_news` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`classid` smallint(5) unsigned NOT NULL DEFAULT '0',
`ttid` smallint(5) unsigned NOT NULL DEFAULT '0',
`onclick` int(10) unsigned NOT NULL DEFAULT '0',
`plnum` mediumint(8) unsigned NOT NULL DEFAULT '0',
`totaldown` mediumint(8) unsigned NOT NULL DEFAULT '0',
`newspath` char(20) NOT NULL DEFAULT '',
`filename` char(36) NOT NULL DEFAULT '',
`userid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`username` char(20) NOT NULL DEFAULT '',
`firsttitle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`isgood` tinyint(3) unsigned NOT NULL DEFAULT '0',
`ispic` tinyint(1) NOT NULL DEFAULT '0',
`istop` tinyint(1) NOT NULL DEFAULT '0',
`isqf` tinyint(1) NOT NULL DEFAULT '0',
`ismember` tinyint(1) NOT NULL DEFAULT '0',
`isurl` tinyint(1) NOT NULL DEFAULT '0',
`truetime` int(10) unsigned NOT NULL DEFAULT '0',
`lastdotime` int(10) unsigned NOT NULL DEFAULT '0',
`havehtml` tinyint(1) NOT NULL DEFAULT '0',
`groupid` smallint(6) NOT NULL DEFAULT '0',
`userfen` smallint(5) unsigned NOT NULL DEFAULT '0',
`titlefont` char(14) NOT NULL DEFAULT '',
`titleurl` char(200) NOT NULL DEFAULT '',
`stb` tinyint(3) unsigned NOT NULL DEFAULT '1',
`fstb` tinyint(3) unsigned NOT NULL DEFAULT '1',
`restb` tinyint(3) unsigned NOT NULL DEFAULT '1',
`keyboard` char(80) NOT NULL DEFAULT '',
`title` char(100) NOT NULL DEFAULT '',
`newstime` int(10) unsigned NOT NULL DEFAULT '0',
`titlepic` char(120) NOT NULL DEFAULT '',
`eckuid` int(11) NOT NULL DEFAULT '0',
`ftitle` char(120) NOT NULL DEFAULT '',
`smalltext` char(255) NOT NULL DEFAULT '',
`diggtop` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `classid` (`classid`),
KEY `newstime` (`newstime`),
KEY `ttid` (`ttid`),
KEY `firsttitle` (`firsttitle`),
KEY `isgood` (`isgood`),
KEY `ispic` (`ispic`),
KEY `useridis` (`userid`,`ismember`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
对比可以发现 文章表比新闻表 多了 三个字段,分别是writer、befrom、newstext,新闻数据表这三个字段是放在副表中的。
功能区别:
两个表都可以存文章了。只是保存的形式不同而已。
文章模型保存的是文本文件。适合大数据方式。对于数据量比较大的,推荐使用文章系统模型。
新闻模型保存的数据库文件。(方便数据库检索,缺点,数据量大了慢,不过可以放到归档里)
我是推荐使用新闻表,可以检索到文本内容的。文章模型不行,只能检索到标题关键等。
推荐教程:帝国CMS教程
以上就是帝国cms文章系统模型和新闻系统模型的区别,更多相关内容请关注帝国模板之家。
转载请注明来源:帝国cms文章系统模型和新闻系统模型的区别
本文永久链接地址:https://www.moyouyouw.cn/code/542.html
郑重声明:本站所有主题/文章除标明原创外,均来自网络转载,版权归原作者所有,如果有侵犯到您的权益,请联系本站删除,谢谢!我们不承担任何技术及版权问题,且不对任何资源负法律责任。
售价: 399 146 ℃ 0 评论
售价: 399 126 ℃ 0 评论
售价: 399 93 ℃ 0 评论
已有 位小伙伴发表了看法
欢迎 你 发表评论