Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] 待体无完肤回复—x1.5用户栏目为空—复制代码编码更改问题

[复制链接]
中国鳗鱼 发表于 2011-1-23 15:18:14 | 显示全部楼层 |阅读模式
  • DROP TABLE IF EXISTS cdb_common_member_profile_setting;
  • CREATE TABLE cdb_common_member_profile_setting (
  •   fieldid varchar(255) NOT NULL default '' COMMENT 'profile字段标志符',
  •   available tinyint(1) NOT NULL default '0' COMMENT '是否可用',
  •   invisible tinyint(1) NOT NULL default '0' COMMENT '是否隐藏',
  •   needverify tinyint(1) NOT NULL default '0' COMMENT '是否需要审核',
  •   title varchar(255) NOT NULL default '' COMMENT '栏目标题',
  •   description varchar(255) NOT NULL default '' COMMENT '解释说明',
  •   displayorder smallint(6) unsigned NOT NULL default '0' COMMENT '显示顺序',
  •   required tinyint(1) NOT NULL default '0' COMMENT '是否必填内容',
  •   unchangeable tinyint(1) NOT NULL default '0' COMMENT '不可修改',
  •   showinthread tinyint(1) NOT NULL default '0' COMMENT '在帖子中显示',
  •   allowsearch tinyint(1) NOT NULL default '0' COMMENT '是否可搜索',
  •   formtype varchar(255) NOT NULL COMMENT '表单元素类型',
  •   size smallint(6) unsigned NOT NULL default '0' COMMENT '内容最大长度',
  •   choices text NOT NULL COMMENT '选填内容',
  •   validate text NOT NULL COMMENT '验证数据的正则表达式',
  •   PRIMARY KEY  (fieldid)
  • ) ENGINE=MyISAM  COMMENT='个人信息扩展表' ;
  • INSERT INTO cdb_common_member_profile_setting VALUES ('gender','1','0','0','性别','','0','0','0','0','1','select','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('birthyear','1','0','0','出生年份','','0','0','0','0','1','select','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('birthmonth','1','0','0','出生月份','','0','0','0','0','0','select','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('birthday','1','0','0','出生日期','','0','0','0','0','0','select','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('constellation','1','1','0','星座','星座(根据生日自动计算)','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('zodiac','1','1','0','生肖','生肖(根据生日自动计算)','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('telephone','1','1','0','固定电话','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('mobile','1','1','0','手机','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('idcardtype','1','1','0','证件号类型','身份证 护照 驾驶证等','0','0','0','0','0','select','0','身份证\n护照\n驾驶证','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('idcard','1','1','0','证件号','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('address','1','1','0','邮寄地址','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('zipcode','1','1','0','邮编','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('nationality','0','0','0','国籍','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('birthprovince','1','0','0','出生省份','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('birthcity','1','0','0','出生城市','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('resideprovince','1','0','0','居住省份','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('residecity','1','0','0','居住城市','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('residedist','1','0','0','居住县','居住行政区/县','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('residecommunity','1','0','0','居住小区','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('residesuite','0','0','0','房间','小区、写字楼门牌号','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('graduateschool','1','0','0','毕业学校','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('education','1','0','0','学历','','0','0','0','0','0','select','0','博士\n硕士\n本科\n专科\n中学\n小学\n其它','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('company','1','0','0','公司','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('occupation','1','0','0','职业','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('position','1','0','0','职位','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('revenue','1','0','0','年收入','单位 元','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('affectivestatus','1','1','0','情感状态','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('lookingfor','1','0','0','交友目的','希望在网站找到什么样的朋友','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('bloodtype','1','1','0','血型','','0','0','0','0','0','select','0','A\nB\nAB\nO\n其它','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('height','0','1','0','身高','单位 cm','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('weight','0','1','0','体重','单位 kg','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('alipay','1','1','0','支付宝帐号','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('icq','0','1','0','ICQ号','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('qq','1','1','0','QQ号','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('yahoo','0','1','0','YAHOO帐号','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('msn','1','1','0','MSN帐号','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('taobao','1','1','0','阿里旺旺帐号','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('site','1','0','0','个人主页','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('bio','1','1','0','自我介绍','','0','0','0','0','0','textarea','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('interest','1','0','0','兴趣爱好','','0','0','0','0','0','textarea','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('field1','0','1','0','自定义字段1','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('field2','0','1','0','自定义字段2','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('field3','0','1','0','自定义字段3','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('field4','0','1','0','自定义字段4','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('field5','0','1','0','自定义字段5','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('field6','0','1','0','自定义字段6','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('field7','0','1','0','自定义字段7','','0','0','0','0','0','text','0','','');
  • INSERT INTO cdb_common_member_profile_setting VALUES ('field8','0','1','0','自定义字段8','','0','0','0','0','0','text','0','','');

复制代码
把里面的表前缀改成你自己的,编码改成自己论坛编码,升级数据库即可。

已复制代码升级数据库,因论坛是gbk编码致升级后用户栏目显示乱码。请教该如何修改编码?谢。。。
 楼主| 中国鳗鱼 发表于 2011-1-23 17:02:03 | 显示全部楼层
说明:
这段代码是..在12楼的体无完肤的基础上修改的...

主要说明两点..
12楼的没有定义字符串导致乱码..现已修正..
第二就是字段名的前缀问题...我这里是pre的前缀..大家根据自己的情况来修改
DROP TABLE IF EXISTS pre_common_member_profile_setting;   删除数据库表(注意表前缀)
CREATE TABLE pre_common_member_profile_setting    新建表 注意前缀
下面的一样 最好用替换
01.DROP TABLE IF EXISTS pre_common_member_profile_setting;                             

02.CREATE TABLE pre_common_member_profile_setting (

03.  fieldid varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL default '' COMMENT 'profile字段标志符',

04.  available tinyint(1) NOT NULL default '0' COMMENT '是否可用',

05.  invisible tinyint(1) NOT NULL default '0' COMMENT '是否隐藏',

06.  needverify tinyint(1) NOT NULL default '0' COMMENT '是否需要审核',

07.  title varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL default '' COMMENT '栏目标题',

08.  description varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL default '' COMMENT '解释说明',

09.  displayorder smallint(6) unsigned NOT NULL default '0' COMMENT '显示顺序',

10.  required tinyint(1) NOT NULL default '0' COMMENT '是否必填内容',

11.  unchangeable tinyint(1) NOT NULL default '0' COMMENT '不可修改',

12.  showinthread tinyint(1) NOT NULL default '0' COMMENT '在帖子中显示',

13.  allowsearch tinyint(1) NOT NULL default '0' COMMENT '是否可搜索',

14.  formtype varchar(255) CHARACTER SET gbk COLLATE gbk_chinese_ci NULL COMMENT '表单元素类型',

15.  size smallint(6) unsigned NOT NULL default '0' COMMENT '内容最大长度',

16.  choices text CHARACTER SET gbk COLLATE gbk_chinese_ci NULL COMMENT '选填内容',

17.  validate text CHARACTER SET gbk COLLATE gbk_chinese_ci NULL COMMENT '验证数据的正则表达式',

18.  PRIMARY KEY  (fieldid)

19.) ENGINE=MyISAM  COMMENT='个人信息扩展表' ,ENGINE=MyISAM DEFAULT CHARSET=gbk;

20.

21.INSERT INTO pre_common_member_profile_setting VALUES ('gender','1','0','0','性别','','0','0','0','0','1','select','0','','');

22.INSERT INTO pre_common_member_profile_setting VALUES ('birthyear','1','0','0','出生年

23.

24.份','','0','0','0','0','1','select','0','','');

25.INSERT INTO pre_common_member_profile_setting VALUES ('birthmonth','1','0','0','出生月

26.

27.份','','0','0','0','0','0','select','0','','');

28.INSERT INTO pre_common_member_profile_setting VALUES ('birthday','1','0','0','出生日

29.

30.期','','0','0','0','0','0','select','0','','');

31.INSERT INTO pre_common_member_profile_setting VALUES ('constellation','1','1','0','星座','星座(根据生日自动计

32.

33.算)','0','0','0','0','0','text','0','','');

34.INSERT INTO pre_common_member_profile_setting VALUES ('zodiac','1','1','0','生肖','生肖(根据生日自动计

35.

36.算)','0','0','0','0','0','text','0','','');

37.INSERT INTO pre_common_member_profile_setting VALUES ('telephone','1','1','0','固定电话','','0','0','0','0','0','text','0','','');

38.INSERT INTO pre_common_member_profile_setting VALUES ('mobile','1','1','0','手机','','0','0','0','0','0','text','0','','');

39.INSERT INTO pre_common_member_profile_setting VALUES ('idcardtype','1','1','0','证件号类型','身份证 护照 驾驶证

40.

41.等','0','0','0','0','0','select','0','身份证\n护照\n驾驶证','');

42.INSERT INTO pre_common_member_profile_setting VALUES ('idcard','1','1','0','证件号','','0','0','0','0','0','text','0','','');

43.INSERT INTO pre_common_member_profile_setting VALUES ('address','1','1','0','邮寄地址','','0','0','0','0','0','text','0','','');

44.INSERT INTO pre_common_member_profile_setting VALUES ('zipcode','1','1','0','邮编','','0','0','0','0','0','text','0','','');

45.INSERT INTO pre_common_member_profile_setting VALUES ('nationality','0','0','0','国籍','','0','0','0','0','0','text','0','','');

46.INSERT INTO pre_common_member_profile_setting VALUES ('birthprovince','1','0','0','出生省

47.

48.份','','0','0','0','0','0','text','0','','');

49.INSERT INTO pre_common_member_profile_setting VALUES ('birthcity','1','0','0','出生城市','','0','0','0','0','0','text','0','','');

50.INSERT INTO pre_common_member_profile_setting VALUES ('resideprovince','1','0','0','居住省

51.

52.份','','0','0','0','0','0','text','0','','');

53.INSERT INTO pre_common_member_profile_setting VALUES ('residecity','1','0','0','居住城

54.

55.市','','0','0','0','0','0','text','0','','');

56.INSERT INTO pre_common_member_profile_setting VALUES ('residedist','1','0','0','居住县','居住行政区/

57.

58.县','0','0','0','0','0','text','0','','');

59.INSERT INTO pre_common_member_profile_setting VALUES ('residecommunity','1','0','0','居住小

60.

61.区','','0','0','0','0','0','text','0','','');

62.INSERT INTO pre_common_member_profile_setting VALUES ('residesuite','0','0','0','房间','小区、写字楼门牌

63.

64.号','0','0','0','0','0','text','0','','');

65.INSERT INTO pre_common_member_profile_setting VALUES ('graduateschool','1','0','0','毕业学

66.

67.校','','0','0','0','0','0','text','0','','');

68.INSERT INTO pre_common_member_profile_setting VALUES ('education','1','0','0','学历','','0','0','0','0','0','select','0','博士\n硕

69.

70.士\n本科\n专科\n中学\n小学\n其它','');

71.INSERT INTO pre_common_member_profile_setting VALUES ('company','1','0','0','公司','','0','0','0','0','0','text','0','','');

72.INSERT INTO pre_common_member_profile_setting VALUES ('occupation','1','0','0','职业','','0','0','0','0','0','text','0','','');

73.INSERT INTO pre_common_member_profile_setting VALUES ('position','1','0','0','职位','','0','0','0','0','0','text','0','','');

74.INSERT INTO pre_common_member_profile_setting VALUES ('revenue','1','0','0','年收入','单位

75.

76.元','0','0','0','0','0','text','0','','');

77.INSERT INTO pre_common_member_profile_setting VALUES ('affectivestatus','1','1','0','情感状

78.

79.态','','0','0','0','0','0','text','0','','');

80.INSERT INTO pre_common_member_profile_setting VALUES ('lookingfor','1','0','0','交友目的','希望在网站找到什么样的朋

81.

82.友','0','0','0','0','0','text','0','','');

83.INSERT INTO pre_common_member_profile_setting VALUES ('bloodtype','1','1','0','血

84.

85.型','','0','0','0','0','0','select','0','A\nB\nAB\nO\n其它','');

86.INSERT INTO pre_common_member_profile_setting VALUES ('height','0','1','0','身高','单位 cm','0','0','0','0','0','text','0','','');

87.INSERT INTO pre_common_member_profile_setting VALUES ('weight','0','1','0','体重','单位 kg','0','0','0','0','0','text','0','','');

88.INSERT INTO pre_common_member_profile_setting VALUES ('alipay','1','1','0','支付宝帐号','','0','0','0','0','0','text','0','','');

89.INSERT INTO pre_common_member_profile_setting VALUES ('icq','0','1','0','ICQ号','','0','0','0','0','0','text','0','','');

90.INSERT INTO pre_common_member_profile_setting VALUES ('qq','1','1','0','QQ号','','0','0','0','0','0','text','0','','');

91.INSERT INTO pre_common_member_profile_setting VALUES ('yahoo','0','1','0','YAHOO帐号','','0','0','0','0','0','text','0','','');

92.INSERT INTO pre_common_member_profile_setting VALUES ('msn','1','1','0','MSN帐号','','0','0','0','0','0','text','0','','');

93.INSERT INTO pre_common_member_profile_setting VALUES ('taobao','1','1','0','阿里旺旺帐

94.

95.号','','0','0','0','0','0','text','0','','');

96.INSERT INTO pre_common_member_profile_setting VALUES ('site','1','0','0','个人主页','','0','0','0','0','0','text','0','','');

97.INSERT INTO pre_common_member_profile_setting VALUES ('bio','1','1','0','自我介绍','','0','0','0','0','0','textarea','0','','');

98.INSERT INTO pre_common_member_profile_setting VALUES ('interest','1','0','0','兴趣爱

99.

100.好','','0','0','0','0','0','textarea','0','','');

101.INSERT INTO pre_common_member_profile_setting VALUES ('field1','0','1','0','自定义字段1','','0','0','0','0','0','text','0','','');

102.INSERT INTO pre_common_member_profile_setting VALUES ('field2','0','1','0','自定义字段2','','0','0','0','0','0','text','0','','');

103.INSERT INTO pre_common_member_profile_setting VALUES ('field3','0','1','0','自定义字段3','','0','0','0','0','0','text','0','','');

104.INSERT INTO pre_common_member_profile_setting VALUES ('field4','0','1','0','自定义字段4','','0','0','0','0','0','text','0','','');

105.INSERT INTO pre_common_member_profile_setting VALUES ('field5','0','1','0','自定义字段5','','0','0','0','0','0','text','0','','');

106.INSERT INTO pre_common_member_profile_setting VALUES ('field6','0','1','0','自定义字段6','','0','0','0','0','0','text','0','','');

107.INSERT INTO pre_common_member_profile_setting VALUES ('field7','0','1','0','自定义字段7','','0','0','0','0','0','text','0','','');

108.INSERT INTO pre_common_member_profile_setting VALUES ('field8','0','1','0','自定义字段8','','0','0','0','0','0','text','0','','');
复制代码
回复

使用道具 举报

paobar 发表于 2011-1-25 21:29:37 | 显示全部楼层
本帖最后由 paobar 于 2011-1-25 21:30 编辑

自定义栏目升级丢失问题,我不懂PHP、SQL,是用一个比较笨的方法解决的。
找到一个数据库软件“Navicat for MySQL”,然后就用excel类似的拷贝粘贴方法,将7.2数据库的自定义栏目内容一个个拷贝到新的数据库里,OK了。
当然后台自定义栏目还是要设置过的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-16 16:50 , Processed in 0.025223 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表