首页 > Web开发 > 详细

discuz pre_forum_postposition表说明 - 一种新的自增字段实例

时间:2015-01-30 15:33:56      阅读:416      评论:0      收藏:0      [点我收藏+]

pre_forum_postposition

抢楼帖时会用到

CREATE TABLE `pre_forum_postposition` (
`tid` mediumint(8) unsigned NOT NULL,
`position` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pid` int(10) unsigned NOT NULL,
PRIMARY KEY (`tid`,`position`),
KEY `pid` (`pid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk

 

主键是`tid`,`position`, 当插入   insert into pre_forum_postposition set tid=1128898, pid=2814945;

`position` 以 `tid` `pid` 为区分在该条件下自增

 

| 1128898 | 38 | 2811923 |
| 1128898 | 39 | 2814943 |

insert into pre_forum_postposition set tid=1128898, pid=2814945;

| 1128898 | 39 | 2814943 |
| 1128898 | 40 | 2814945 |

 

discuz pre_forum_postposition表说明 - 一种新的自增字段实例

原文:http://www.cnblogs.com/bandbandme/p/4262013.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!