Tag Archives: sql

UCHOME2.0 + UCENTER1.6的短消息问题

给ucenter的数据库加一张uc_pms表就行了。
内容如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
CREATE TABLE IF NOT EXISTS  `uc_pms` (
 `pmid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
 `msgfrom` VARCHAR( 15 ) NOT NULL DEFAULT  '',
 `msgfromid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT  '0',
 `msgtoid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT  '0',
 `folder` ENUM(  'inbox',  'outbox' ) NOT NULL DEFAULT  'inbox',
 `new` TINYINT( 1 ) NOT NULL DEFAULT  '0',
 `subject` VARCHAR( 75 ) NOT NULL DEFAULT  '',
 `dateline` INT( 10 ) UNSIGNED NOT NULL DEFAULT  '0',
 `message` TEXT NOT NULL ,
 `delstatus` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT  '0',
 `related` INT( 10 ) UNSIGNED NOT NULL DEFAULT  '0',
 `fromappid` SMALLINT( 6 ) UNSIGNED NOT NULL DEFAULT  '0',
PRIMARY KEY (  `pmid` ) ,
KEY  `msgtoid` (  `msgtoid` ,  `folder` ,  `dateline` ) ,
KEY  `msgfromid` (  `msgfromid` ,  `folder` ,  `dateline` ) ,
KEY  `related` (  `related` ) ,
KEY  `getnum` (  `msgtoid` ,  `folder` ,  `delstatus` )
) ENGINE = MYISAM DEFAULT CHARSET = gbk AUTO_INCREMENT =1

@helijohnny提醒还要加上

NGINE = MYISAM DEFAULT CHARSET = utf8

才能保证utf-8
2012.05.09