2.0的session table構造
CREATE TABLE cdb_sessions (
sid varchar(8) binary NOT NULL default '',
ip varchar(15) NOT NULL default '',
ipbanned tinyint(1) NOT NULL default '0',
status enum('Guest','Member','Admin','SuperMod','Moderator','Banned','IPBanned','PostBanned','Inactive') NOT NULL default 'Guest',
username varchar(15) NOT NULL default '',
lastactivity int(10) unsigned NOT NULL default '0',
groupid smallint(6) unsigned NOT NULL default '0',
styleid smallint(6) unsigned NOT NULL default '0',
action tinyint(1) unsigned NOT NULL default '0',
fid smallint(6) unsigned NOT NULL default '0',
tid mediumint(8) unsigned NOT NULL default '0',
KEY sid (sid)
) TYPE=HEAP MAX_ROWS=1000;
其中
status enum('Guest','Member','Admin','SuperMod','Moderator','Banned','IPBanned','PostBanned','Inactive') NOT NULL default 'Guest',
如果你查看自己的session沒有, status, 就按他這樣新增一個enum種的 status field. OR 直接 run以下sql
ALTER TABLE `cdb_sessions` ADD STATUS enum( 'Guest', 'Member', 'Admin', 'SuperMod', 'Moderator', 'Banned', 'IPBanned', 'PostBanned', 'Inactive' ) NOT NULL default 'Guest'