Tables structure:
CREATE TABLE `qa_users` (
`userid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created` datetime NOT NULL,
`createip` varbinary(16) NOT NULL,
`email` varchar(80) NOT NULL,
`handle` varchar(20) NOT NULL,
`avatarblobid` bigint(20) unsigned DEFAULT NULL,
`avatarwidth` smallint(5) unsigned DEFAULT NULL,
`avatarheight` smallint(5) unsigned DEFAULT NULL,
`passsalt` binary(16) DEFAULT NULL,
`passcheck` binary(20) DEFAULT NULL,
`passhash` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`level` tinyint(3) unsigned NOT NULL,
`loggedin` datetime NOT NULL,
`loginip` varbinary(16) NOT NULL,
`written` datetime DEFAULT NULL,
`writeip` varbinary(16) DEFAULT NULL,
`emailcode` char(8) CHARACTER SET ascii NOT NULL DEFAULT '',
`sessioncode` char(8) CHARACTER SET ascii NOT NULL DEFAULT '',
`sessionsource` varchar(16) CHARACTER SET ascii DEFAULT '',
`flags` smallint(5) unsigned NOT NULL DEFAULT '0',
`wallposts` mediumint(9) NOT NULL DEFAULT '0',
PRIMARY KEY (`userid`),
KEY `email` (`email`),
KEY `handle` (`handle`),
KEY `level` (`level`),
KEY `created` (`created`,`level`,`flags`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `qap_userlimits` (
`userid` int(10) unsigned NOT NULL,
`action` char(1) CHARACTER SET ascii NOT NULL,
`period` int(10) unsigned NOT NULL,
`count` smallint(5) unsigned NOT NULL,
UNIQUE KEY `userid` (`userid`,`action`),
CONSTRAINT `qap_userlimits_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `qap_users` (`userid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;